diff --git a/adm/cmake/occt_toolkit.cmake b/adm/cmake/occt_toolkit.cmake index 033c82ec8b..3fb6035a50 100644 --- a/adm/cmake/occt_toolkit.cmake +++ b/adm/cmake/occt_toolkit.cmake @@ -281,11 +281,10 @@ else() endif() endif() -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() +if(IS_VTK_9XX) + string (REGEX REPLACE "vtk" "VTK::" USED_TOOLKITS_BY_CURRENT_PROJECT "${USED_TOOLKITS_BY_CURRENT_PROJECT}") endif() + target_link_libraries (${PROJECT_NAME} ${USED_TOOLKITS_BY_CURRENT_PROJECT} ${USED_EXTERNAL_LIBS_BY_CURRENT_PROJECT}) if (USE_QT)