Debian Codegraph @

cmake_modules/FindOggTheora.cmake

raw
1 #
2 # Find the native Ogg/Theora includes and libraries
3 #
4 # This module defines
5 # OGGTHEORA_INCLUDE_DIR, where to find ogg/ogg.h and theora/theora.h
6 # OGGTHEORA_LIBRARIES, the libraries to link against to use Ogg/Theora.
7 # OGGTHEORA_FOUND, If false, do not try to use Ogg/Theora.
8
9 FIND_PATH(OGGTHEORA_ogg_INCLUDE_DIR ogg/ogg.h)
10
11 FIND_PATH(OGGTHEORA_theora_INCLUDE_DIR theora/theora.h)
12
13 FIND_LIBRARY(OGGTHEORA_ogg_LIBRARY ogg)
14
15 FIND_LIBRARY(OGGTHEORA_theoraenc_LIBRARY theoraenc)
16
17 FIND_LIBRARY(OGGTHEORA_theoradec_LIBRARY theoradec)
18
19 SET(OGGTHEORA_INCLUDE_DIRS
20 ${OGGTHEORA_ogg_INCLUDE_DIR}
21 ${OGGTHEORA_theora_INCLUDE_DIR}
22 )
23 #HACK multiple directories
24 SET(OGGTHEORA_INCLUDE_DIR ${OGGTHEORA_INCLUDE_DIRS})
25
26 SET(OGGTHEORA_LIBRARIES
27 ${OGGTHEORA_theoraenc_LIBRARY}
28 ${OGGTHEORA_theoradec_LIBRARY}
29 ${OGGTHEORA_ogg_LIBRARY}
30 )
31 #HACK multiple libraries
32 SET(OGGTHEORA_LIBRARY ${OGGTHEORA_LIBRARIES})
33
34 INCLUDE(FindPackageHandleStandardArgs)
35 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OGGTHEORA
36 "Could NOT find the ogg and theora libraries"
37 OGGTHEORA_ogg_LIBRARY
38 OGGTHEORA_theoraenc_LIBRARY
39 OGGTHEORA_theoradec_LIBRARY
40 OGGTHEORA_ogg_INCLUDE_DIR
41 OGGTHEORA_theora_INCLUDE_DIR
42 )
43
44 MARK_AS_ADVANCED(OGGTHEORA_ogg_INCLUDE_DIR OGGTHEORA_theora_INCLUDE_DIR
45 OGGTHEORA_ogg_LIBRARY OGGTHEORA_theoraenc_LIBRARY
46 OGGTHEORA_theoradec_LIBRARY
47 )