2017-10-25 14:57:25 +00:00
|
|
|
if(NOT CMAKE_CROSSCOMPILING)
|
|
|
|
find_package(PkgConfig QUIET)
|
|
|
|
pkg_check_modules(PC_OPUS opus)
|
|
|
|
endif()
|
2017-02-28 23:51:22 +00:00
|
|
|
|
2017-10-24 10:10:46 +00:00
|
|
|
set_extra_dirs_lib(OPUS opus)
|
2017-03-07 12:39:23 +00:00
|
|
|
find_library(OPUS_LIBRARY
|
|
|
|
NAMES opus
|
2017-07-31 16:30:24 +00:00
|
|
|
HINTS ${HINTS_OPUS_LIBDIR} ${PC_OPUS_LIBDIR} ${PC_OPUS_LIBRARY_DIRS}
|
|
|
|
PATHS ${PATHS_OPUS_LIBDIR}
|
2017-10-25 14:57:25 +00:00
|
|
|
${CROSSCOMPILING_NO_CMAKE_SYSTEM_PATH}
|
2017-03-07 12:39:23 +00:00
|
|
|
)
|
2017-10-24 10:10:46 +00:00
|
|
|
set_extra_dirs_include(OPUS opus "${OPUS_LIBRARY}")
|
|
|
|
find_path(OPUS_INCLUDEDIR opus.h
|
|
|
|
PATH_SUFFIXES opus
|
|
|
|
HINTS ${HINTS_OPUS_INCLUDEDIR} ${PC_OPUS_INCLUDEDIR} ${PC_OPUS_INCLUDE_DIRS}
|
|
|
|
PATHS ${PATHS_OPUS_INCLUDEDIR}
|
2017-10-25 14:57:25 +00:00
|
|
|
${CROSSCOMPILING_NO_CMAKE_SYSTEM_PATH}
|
2017-10-24 10:10:46 +00:00
|
|
|
)
|
2017-02-28 23:51:22 +00:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2017-03-02 11:31:20 +00:00
|
|
|
find_package_handle_standard_args(Opus DEFAULT_MSG OPUS_INCLUDEDIR)
|
2017-02-28 23:51:22 +00:00
|
|
|
|
2017-03-07 12:39:23 +00:00
|
|
|
mark_as_advanced(OPUS_INCLUDEDIR OPUS_LIBRARY)
|
2017-02-28 23:51:22 +00:00
|
|
|
|
|
|
|
set(OPUS_INCLUDE_DIRS ${OPUS_INCLUDEDIR})
|
2017-03-07 12:39:23 +00:00
|
|
|
if(OPUS_LIBRARY)
|
|
|
|
set(OPUS_LIBRARIES ${OPUS_LIBRARY})
|
|
|
|
else()
|
|
|
|
set(OPUS_LIBRARIES)
|
|
|
|
endif()
|