diff options
| author | Niels Ole Salscheider <niels_ole@salscheider-online.de> | 2017-09-03 22:27:25 +0200 |
|---|---|---|
| committer | Niels Ole Salscheider <niels_ole@salscheider-online.de> | 2017-09-04 20:34:53 +0200 |
| commit | 77d52eb507474ae5a2c1b2f540e3c67945eaea37 (patch) | |
| tree | 7f0a9e19bd8cdff3f5ecb72ce04708c42e9558c7 /cmake/modules/FindOpus.cmake | |
| parent | 8e0415d0bacbce3fc6d7b66304936d578d52b214 (diff) | |
| download | qxmpp-77d52eb507474ae5a2c1b2f540e3c67945eaea37.tar.gz | |
Re-add codecs support to the build system
Diffstat (limited to 'cmake/modules/FindOpus.cmake')
| -rw-r--r-- | cmake/modules/FindOpus.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cmake/modules/FindOpus.cmake b/cmake/modules/FindOpus.cmake new file mode 100644 index 00000000..fc13497b --- /dev/null +++ b/cmake/modules/FindOpus.cmake @@ -0,0 +1,25 @@ +# Try to find Opus +# Once done this will define +# Opus_FOUND - System has Opus +# Opus_INCLUDE_DIRS - The Opus include directories +# Opus_LIBRARIES - The libraries needed to use Opus + +find_package(PkgConfig) +pkg_check_modules(PC_Opus QUIET libopus) + +find_path(Opus_INCLUDE_DIR opus/opus.h + HINTS ${PC_Opus_INCLUDEDIR} ${PC_Opus_INCLUDE_DIRS} +) + +find_library(Opus_LIBRARY NAMES opus + HINTS ${PC_Opus_LIBDIR} ${PC_Opus_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Opus DEFAULT_MSG Opus_LIBRARY Opus_INCLUDE_DIR) + +mark_as_advanced(Opus_INCLUDE_DIR Opus_LIBRARY) + +set(Opus_LIBRARIES ${Opus_LIBRARY}) +set(Opus_INCLUDE_DIRS ${Opus_INCLUDE_DIR}) + |
