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 | |
| parent | 8e0415d0bacbce3fc6d7b66304936d578d52b214 (diff) | |
Re-add codecs support to the build system
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/modules/FindOpus.cmake | 25 | ||||
| -rw-r--r-- | cmake/modules/FindSpeex.cmake | 25 | ||||
| -rw-r--r-- | cmake/modules/FindTheora.cmake | 33 | ||||
| -rw-r--r-- | cmake/modules/FindVPX.cmake | 25 |
4 files changed, 108 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}) + diff --git a/cmake/modules/FindSpeex.cmake b/cmake/modules/FindSpeex.cmake new file mode 100644 index 00000000..3929b2ec --- /dev/null +++ b/cmake/modules/FindSpeex.cmake @@ -0,0 +1,25 @@ +# Try to find Speex +# Once done this will define +# Speex_FOUND - System has Speex +# Speex_INCLUDE_DIRS - The Speex include directories +# Speex_LIBRARIES - The libraries needed to use Speex + +find_package(PkgConfig) +pkg_check_modules(PC_Speex QUIET libspeex) + +find_path(Speex_INCLUDE_DIR speex/speex.h + HINTS ${PC_Speex_INCLUDEDIR} ${PC_Speex_INCLUDE_DIRS} +) + +find_library(Speex_LIBRARY NAMES speex + HINTS ${PC_Speex_LIBDIR} ${PC_Speex_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Speex DEFAULT_MSG Speex_LIBRARY Speex_INCLUDE_DIR) + +mark_as_advanced(Speex_INCLUDE_DIR Speex_LIBRARY) + +set(Speex_LIBRARIES ${Speex_LIBRARY}) +set(Speex_INCLUDE_DIRS ${Speex_INCLUDE_DIR}) + diff --git a/cmake/modules/FindTheora.cmake b/cmake/modules/FindTheora.cmake new file mode 100644 index 00000000..24462794 --- /dev/null +++ b/cmake/modules/FindTheora.cmake @@ -0,0 +1,33 @@ +# Try to find Theora +# Once done this will define +# Theora_FOUND - System has Theora +# Theora_INCLUDE_DIRS - The Theora include directories +# Theora_LIBRARIES - The libraries needed to use Theora + +find_package(PkgConfig) +pkg_check_modules(PC_Theora QUIET libtheora) + +find_path(Theora_INCLUDE_DIR theora/theora.h + HINTS ${PC_Theora_INCLUDEDIR} ${PC_Theora_INCLUDE_DIRS} +) + +find_library(Theora_LIBRARY NAMES theora + HINTS ${PC_Theora_LIBDIR} ${PC_Theora_LIBRARY_DIRS} +) + +find_library(Theora_enc_LIBRARY NAMES theoraenc + HINTS ${PC_Theora_LIBDIR} ${PC_Theora_LIBRARY_DIRS} +) + +find_library(Theora_dec_LIBRARY NAMES theoradec + HINTS ${PC_Theora_LIBDIR} ${PC_Theora_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Theora DEFAULT_MSG Theora_LIBRARY Theora_enc_LIBRARY Theora_dec_LIBRARY Theora_INCLUDE_DIR) + +mark_as_advanced(Theora_INCLUDE_DIR Theora_LIBRARY Theora_enc_LIBRARY Theora_dec_LIBRARY) + +set(Theora_LIBRARIES ${Theora_LIBRARY} ${Theora_enc_LIBRARY} ${Theora_dec_LIBRARY}) +set(Theora_INCLUDE_DIRS ${Theora_INCLUDE_DIR}) + diff --git a/cmake/modules/FindVPX.cmake b/cmake/modules/FindVPX.cmake new file mode 100644 index 00000000..8c60a555 --- /dev/null +++ b/cmake/modules/FindVPX.cmake @@ -0,0 +1,25 @@ +# Try to find VPX +# Once done this will define +# VPX_FOUND - System has VPX +# VPX_INCLUDE_DIRS - The VPX include directories +# VPX_LIBRARIES - The libraries needed to use VPX + +find_package(PkgConfig) +pkg_check_modules(PC_VPX QUIET libvpx) + +find_path(VPX_INCLUDE_DIR vpx/vp8.h + HINTS ${PC_VPX_INCLUDEDIR} ${PC_VPX_INCLUDE_DIRS} +) + +find_library(VPX_LIBRARY NAMES vpx + HINTS ${PC_VPX_LIBDIR} ${PC_VPX_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(VPX DEFAULT_MSG VPX_LIBRARY VPX_INCLUDE_DIR) + +mark_as_advanced(VPX_INCLUDE_DIR VPX_LIBRARY) + +set(VPX_LIBRARIES ${VPX_LIBRARY}) +set(VPX_INCLUDE_DIRS ${VPX_INCLUDE_DIR}) + |
