Skip to content
Snippets Groups Projects
Commit b4dbae91 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

FindTHEORA: avoid duplicate imported targets

parent a5b0d344
No related branches found
No related tags found
No related merge requests found
......@@ -44,20 +44,26 @@ if (THEORA_FOUND)
set(THEORA_LIBRARIES "${THEORA_LIBRARY}" "${THEORA_enc_LIBRARY}" "${THEORA_dec_LIBRARY}")
set(THEORA_INCLUDE_DIRS "${THEORA_INCLUDE_DIR}")
add_library(THEORA::THEORA UNKNOWN IMPORTED)
set_target_properties(THEORA::THEORA PROPERTIES
IMPORTED_LOCATION "${THEORA_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}
INTERFACE_LINK_LIBRARIES OGG::OGG)
add_library(THEORA::ENC UNKNOWN IMPORTED)
set_target_properties(THEORA::ENC PROPERTIES
IMPORTED_LOCATION "${THEORA_enc_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}
INTERFACE_LINK_LIBRARIES OGG::OGG)
add_library(THEORA::DEC UNKNOWN IMPORTED)
set_target_properties(THEORA::DEC PROPERTIES
IMPORTED_LOCATION "${THEORA_dec_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR})
if (NOT TARGET THEORA::THEORA)
add_library(THEORA::THEORA UNKNOWN IMPORTED)
set_target_properties(THEORA::THEORA PROPERTIES
IMPORTED_LOCATION "${THEORA_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}
INTERFACE_LINK_LIBRARIES OGG::OGG)
endif ()
if (NOT TARGET THEORA::ENC)
add_library(THEORA::ENC UNKNOWN IMPORTED)
set_target_properties(THEORA::ENC PROPERTIES
IMPORTED_LOCATION "${THEORA_enc_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}
INTERFACE_LINK_LIBRARIES OGG::OGG)
endif()
if (NOT TARGET THEORA::DEC)
add_library(THEORA::DEC UNKNOWN IMPORTED)
set_target_properties(THEORA::DEC PROPERTIES
IMPORTED_LOCATION "${THEORA_dec_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR})
endif()
endif ()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment