1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

Compare commits

...

1 Commits

Author SHA1 Message Date
kgv
2fb4b68cfd 0031667: Configuration, CMake - Dependencies between targets are not specified for static builds and not public
target_link_libraries() is now set with public interface for CMake >= 3.
2022-02-26 21:31:08 +03:00

View File

@@ -400,6 +400,12 @@ if (BUILD_SHARED_LIBS OR EXECUTABLE_PROJECT)
if(IS_VTK_9XX)
string (REGEX REPLACE "vtk" "VTK::" USED_TOOLKITS_BY_CURRENT_PROJECT "${USED_TOOLKITS_BY_CURRENT_PROJECT}")
endif()
endif()
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.0.0")
# Declare the dependencies public so that all code that uses this library automatically also links with the dependencies
target_link_libraries (${PROJECT_NAME} PUBLIC ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
elseif (BUILD_SHARED_LIBS)
target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT})
endif()