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})