FindSndfile.cmake 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. # - Find sndfile
  2. # Find the native sndfile includes and libraries
  3. #
  4. # SNDFILE_INCLUDE_DIR - where to find sndfile.h, etc.
  5. # SNDFILE_LIBRARIES - List of libraries when using libsndfile.
  6. # SNDFILE_FOUND - True if libsndfile found.
  7. if(SNDFILE_INCLUDE_DIR)
  8. # Already in cache, be silent
  9. set(SNDFILE_FIND_QUIETLY TRUE)
  10. endif(SNDFILE_INCLUDE_DIR)
  11. FIND_PATH(SNDFILE_INCLUDE_DIR NAMES sndfile.h PATHS ${CMAKE_SOURCE_DIR}/libs/libsndfile/src/)
  12. FIND_LIBRARY(SNDFILE_LIBRARY NAMES libsndfile.a PATHS ${CMAKE_SOURCE_DIR}/libs/libsndfile/src/.libs/)
  13. MESSAGE( STATUS "SNDFILE_INCLUDE_DIR = \"${SNDFILE_INCLUDE_DIR}\"" )
  14. MESSAGE( STATUS "SNDFILE_LIBRARY = \"${SNDFILE_LIBRARY}\"" )
  15. # Handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if
  16. # all listed variables are TRUE.
  17. include(FindPackageHandleStandardArgs)
  18. find_package_handle_standard_args(SNDFILE DEFAULT_MSG
  19. SNDFILE_INCLUDE_DIR SNDFILE_LIBRARY)
  20. if(SNDFILE_FOUND)
  21. set(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
  22. else(SNDFILE_FOUND)
  23. set(SNDFILE_LIBRARIES)
  24. endif(SNDFILE_FOUND)
  25. mark_as_advanced(SNDFILE_INCLUDE_DIR SNDFILE_LIBRARY)
  26. MESSAGE( STATUS "SNDFILE_INCLUDE_DIR = \"${SNDFILE_INCLUDE_DIR}\"" )
  27. MESSAGE( STATUS "SNDFILE_LIBRARY = \"${SNDFILE_LIBRARY}\"" )