2019-07-01 06:40:51 -04:00
|
|
|
# - Try to find opus include dirs and libraries
|
|
|
|
#
|
|
|
|
# Usage of this module as follows:
|
|
|
|
#
|
|
|
|
# find_package(opus)
|
|
|
|
#
|
|
|
|
# Variables used by this module, they can change the default behaviour and need
|
|
|
|
# to be set before calling find_package:
|
|
|
|
#
|
|
|
|
# opus_ROOT_DIR Set this variable to the root installation of
|
|
|
|
# opus if the module has problems finding the
|
|
|
|
# proper installation path.
|
|
|
|
#
|
|
|
|
# Variables defined by this module:
|
|
|
|
#
|
|
|
|
# opus_FOUND System has opus, include and library dirs found
|
|
|
|
# opus_INCLUDE_DIR The opus include directories.
|
|
|
|
# opus_LIBRARIES_STATIC The opus libraries.
|
|
|
|
# opus_LIBRARIES_SHARED The opus libraries.
|
|
|
|
|
2019-07-01 20:23:51 -04:00
|
|
|
include(tearoot-helper)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
|
2019-07-01 06:40:51 -04:00
|
|
|
find_path(opus_ROOT_DIR
|
|
|
|
NAMES include/opus/opus.h
|
2019-07-01 20:23:51 -04:00
|
|
|
HINTS ${opus_ROOT_DIR} ${opus_ROOT_DIR}/${BUILD_OUTPUT}
|
2019-07-01 06:40:51 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
find_path(opus_INCLUDE_DIR
|
|
|
|
NAMES opus/opus.h opus/opus_defines.h
|
2019-07-01 20:23:51 -04:00
|
|
|
HINTS ${opus_ROOT_DIR} ${opus_ROOT_DIR}/include/
|
2019-07-01 06:40:51 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
find_library(opus_LIBRARIES_STATIC
|
2019-07-03 07:27:12 -04:00
|
|
|
NAMES libopus.a opus.a opus.lib
|
2019-07-01 20:23:51 -04:00
|
|
|
HINTS ${opus_ROOT_DIR} ${opus_ROOT_DIR}/lib
|
2019-07-01 06:40:51 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
find_library(opus_LIBRARIES_SHARED
|
2019-07-03 07:27:12 -04:00
|
|
|
NAMES opus.dll libopus.so opus.so
|
2019-07-01 20:23:51 -04:00
|
|
|
HINTS ${opus_ROOT_DIR} ${opus_ROOT_DIR}/lib
|
2019-07-01 06:40:51 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
find_package_handle_standard_args(opus DEFAULT_MSG
|
|
|
|
opus_INCLUDE_DIR
|
|
|
|
)
|
|
|
|
|
|
|
|
mark_as_advanced(
|
|
|
|
opus_ROOT_DIR
|
|
|
|
opus_INCLUDE_DIR
|
|
|
|
opus_LIBRARIES_STATIC
|
|
|
|
opus_LIBRARIES_SHARED
|
|
|
|
)
|