vcpkg/ports/opencolorio/0005-tinyxml-dependency-search.patch
2019-09-16 09:08:41 -07:00

19 lines
748 B
Diff

diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 45e55f9..f4b687d 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -77,7 +77,12 @@ endif()
if(OCIO_BUILD_STATIC)
list(REMOVE_ITEM core_src_files ${CMAKE_SOURCE_DIR}/src/core/UnitTest.cpp)
add_library(OpenColorIO_STATIC STATIC ${EXTERNAL_OBJECTS} ${core_src_files})
- add_dependencies(OpenColorIO_STATIC TINYXML_LIB)
+
+ if(USE_EXTERNAL_TINYXML)
+ target_link_libraries(OpenColorIO_STATIC ${TINYXML_LIBRARIES})
+ else(USE_EXTERNAL_TINYXML)
+ add_dependencies(OpenColorIO_STATIC TINYXML_LIB)
+ endif(USE_EXTERNAL_TINYXML)
if(USE_EXTERNAL_YAML)
target_link_libraries(OpenColorIO_STATIC ${YAML_CPP_LIBRARIES})