openspades/cmake/FindOpus.cmake

38 lines
699 B
CMake
Raw Normal View History

2016-12-17 09:46:43 -08:00
FIND_PATH(OpusFile_INCLUDE_DIR opusfile.h
2016-12-18 01:40:45 +09:00
HINTS
$ENV{OPUSDIR}
PATH_SUFFIXES include/opus include
PATHS
~/Library/Frameworks
/Library/Frameworks
/usr/local/include/SDL2
/usr/include/SDL2
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
)
FIND_LIBRARY(OpusFile_LIBRARY
NAMES opusfile
HINTS
$ENV{OPUSDIR}
PATH_SUFFIXES lib64 lib
PATHS
/sw
/opt/local
/opt/csw
/opt
)
2016-12-17 09:46:43 -08:00
set(OpusFile_FOUND "NO")
2016-12-18 20:00:18 +09:00
if(OpusFile_INCLUDE_DIR AND OpusFile_LIBRARY)
2016-12-17 09:46:43 -08:00
set(OpusFile_FOUND "YES")
2016-12-18 01:40:45 +09:00
endif()
INCLUDE(FindPackageHandleStandardArgs)
2016-12-17 09:46:43 -08:00
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpusFile
REQUIRED_VARS OpusFile_LIBRARY OpusFile_INCLUDE_DIR)
2016-12-18 01:40:45 +09:00