1 include(CMakeFindDependencyMacro)
4 find_path(THEORA_INCLUDE_DIR
7 DOC
"theora include directory")
8 mark_as_advanced(THEORA_INCLUDE_DIR)
10 get_filename_component(computed_theora_root
"${THEORA_INCLUDE_DIR}" DIRECTORY)
12 find_library(THEORA_LIBRARY
16 "${computed_theora_root}/lib" 17 "${computed_theora_root}/lib64" 19 mark_as_advanced(THEORA_LIBRARY)
21 find_library(THEORA_enc_LIBRARY
25 "${computed_theora_root}/lib" 26 "${computed_theora_root}/lib64" 27 DOC
"theora encoding library")
28 mark_as_advanced(THEORA_enc_LIBRARY)
30 find_library(THEORA_dec_LIBRARY
34 "${computed_theora_root}/lib" 35 "${computed_theora_root}/lib64" 36 DOC
"theora decoding library")
37 mark_as_advanced(THEORA_dec_LIBRARY)
39 include(FindPackageHandleStandardArgs)
40 find_package_handle_standard_args(THEORA
41 REQUIRED_VARS THEORA_LIBRARY THEORA_enc_LIBRARY THEORA_dec_LIBRARY THEORA_INCLUDE_DIR)
44 set(THEORA_LIBRARIES
"${THEORA_LIBRARY}" "${THEORA_enc_LIBRARY}" "${THEORA_dec_LIBRARY}")
45 set(THEORA_INCLUDE_DIRS
"${THEORA_INCLUDE_DIR}")
47 if (NOT TARGET THEORA::THEORA)
48 add_library(THEORA::THEORA UNKNOWN IMPORTED)
49 set_target_properties(THEORA::THEORA PROPERTIES
50 IMPORTED_LOCATION
"${THEORA_LIBRARY}" 51 INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}
52 INTERFACE_LINK_LIBRARIES OGG::OGG)
55 if (NOT TARGET THEORA::ENC)
56 add_library(THEORA::ENC UNKNOWN IMPORTED)
57 set_target_properties(THEORA::ENC PROPERTIES
58 IMPORTED_LOCATION "${THEORA_enc_LIBRARY}
" 59 INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR} 60 INTERFACE_LINK_LIBRARIES OGG::OGG) 63 if (NOT TARGET THEORA::DEC) 64 add_library(THEORA::DEC UNKNOWN IMPORTED) 65 set_target_properties(THEORA::DEC PROPERTIES 66 IMPORTED_LOCATION "${THEORA_dec_LIBRARY}
" 67 INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR})