1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

Compare commits

...

1 Commits

Author SHA1 Message Date
craffael
61f7249b4c 31667: target_link_libraries with public interface for cmake >= 3 2020-07-16 11:12:39 +02:00

View File

@@ -346,7 +346,10 @@ else()
endif()
endif()
if (BUILD_SHARED_LIBS)
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()