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/FindTheora.cmake | |
| parent | 8e0415d0bacbce3fc6d7b66304936d578d52b214 (diff) | |
| download | qxmpp-77d52eb507474ae5a2c1b2f540e3c67945eaea37.tar.gz | |
Re-add codecs support to the build system
Diffstat (limited to 'cmake/modules/FindTheora.cmake')
| -rw-r--r-- | cmake/modules/FindTheora.cmake | 33 |
1 files changed, 33 insertions, 0 deletions
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}) + |
