File: FindTheora.cmake

package info (click to toggle)
allegro5 2%3A5.2.10.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 10,872 kB
  • sloc: ansic: 109,795; cpp: 12,976; objc: 4,592; java: 2,845; python: 2,595; javascript: 1,238; sh: 1,008; makefile: 41; xml: 27; pascal: 24
file content (40 lines) | stat: -rw-r--r-- 1,269 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# - Find theora
# Find the native theora includes and libraries
#
#  THEORA_INCLUDE_DIR - where to find theora.h, etc.
#  THEORA_LIBRARIES   - List of libraries when using theora.
#  THEORA_FOUND       - True if theora found.

if(THEORA_INCLUDE_DIR)
    # Already in cache, be silent
    set(THEORA_FIND_QUIETLY TRUE)
endif(THEORA_INCLUDE_DIR)

find_package(Ogg)
if(OGG_FOUND)
    find_path(THEORA_INCLUDE_DIR theora/theora.h)
    # MSVC built theora may be named *_static
    # The provided project files name the library with the lib prefix.
    find_library(THEORA_LIBRARY NAMES
          theoradec theoradec_static
          libtheoradec libtheoradec_static
          theora theora_static
          libtheora libtheora_static
          )
    # Handle the QUIETLY and REQUIRED arguments and set THEORA_FOUND
    # to TRUE if all listed variables are TRUE.
    include(FindPackageHandleStandardArgs)
    set(FPHSA_NAME_MISMATCHED TRUE)
    find_package_handle_standard_args(THEORA DEFAULT_MSG
          THEORA_INCLUDE_DIR THEORA_LIBRARY)
endif(OGG_FOUND)

if(THEORA_FOUND)
    set(THEORA_LIBRARIES ${THEORA_LIBRARY} ${OGG_LIBRARY})
else(THEORA_FOUND)
  set(THEORA_LIBRARIES)
endif(THEORA_FOUND)

mark_as_advanced(THEORA_INCLUDE_DIR)
mark_as_advanced(THEORA_LIBRARY)