From: Nabil Ghodbane Date: Tue, 23 May 2023 07:19:53 +0000 (+0200) Subject: bos #33720: implement static libraries for windows. These changes are aimed to resol... X-Git-Tag: V9_11_0rc1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fyacs.git;a=commitdiff_plain;h=897ddc60aa24cb03d23e856a1560b9933eda94bd bos #33720: implement static libraries for windows. These changes are aimed to resolve Persalys compilation issues --- diff --git a/src/bases/Test/CMakeLists.txt b/src/bases/Test/CMakeLists.txt index 35fba9158..bfb4e46b0 100644 --- a/src/bases/Test/CMakeLists.txt +++ b/src/bases/Test/CMakeLists.txt @@ -42,6 +42,12 @@ SET(TestBases_SOURCES # --- rules --- +if(WIN32) + add_library(YACSDLTest_lib STATIC ${YACSDLTest_SOURCES}) + TARGET_LINK_LIBRARIES(YACSDLTest_lib ${_link_LIBRARIES}) + set_target_properties(YACSDLTest_lib PROPERTIES OUTPUT_NAME YACSDLTest) +endif(WIN32) + ADD_LIBRARY(YACSDLTest ${YACSDLTest_SOURCES}) INSTALL(TARGETS YACSDLTest EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_YACS_INSTALL_TEST_LIB}) diff --git a/src/engine/Plugin/CMakeLists.txt b/src/engine/Plugin/CMakeLists.txt index 310265215..32451b921 100644 --- a/src/engine/Plugin/CMakeLists.txt +++ b/src/engine/Plugin/CMakeLists.txt @@ -41,7 +41,11 @@ SET(PluginSimplex_SOURCES ) # --- rules --- - +if(WIN32) + add_library(PluginSimplex_lib STATIC ${PluginSimplex_SOURCES}) + TARGET_LINK_LIBRARIES(PluginSimplex_lib ${_link_LIBRARIES}) + set_target_properties(PluginSimplex_lib PROPERTIES OUTPUT_NAME PluginSimplex) +endif(WIN32) ADD_LIBRARY(PluginSimplex ${PluginSimplex_SOURCES}) TARGET_LINK_LIBRARIES(PluginSimplex YACSlibEngine) INSTALL(TARGETS PluginSimplex EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/src/engine/Test/CMakeLists.txt b/src/engine/Test/CMakeLists.txt index a711cd0eb..b089edbe0 100644 --- a/src/engine/Test/CMakeLists.txt +++ b/src/engine/Test/CMakeLists.txt @@ -63,7 +63,11 @@ SET(IntegrationTestEngine_SOURCES ) # --- rules --- - +if(WIN32) + add_library(PluginOptEvTest1_lib STATIC ${PluginOptEvTest1_SOURCES}) + TARGET_LINK_LIBRARIES(PluginOptEvTest1_lib ${_link_LIBRARIES}) + set_target_properties(PluginOptEvTest1_lib PROPERTIES OUTPUT_NAME PluginOptEvTest1) +endif(WIN32) ADD_LIBRARY(PluginOptEvTest1 ${PluginOptEvTest1_SOURCES}) TARGET_LINK_LIBRARIES(PluginOptEvTest1 YACSlibEngine) INSTALL(TARGETS PluginOptEvTest1 EXPORT ${PROJECT_NAME}TargetGroup diff --git a/src/runtime/Test/CMakeLists.txt b/src/runtime/Test/CMakeLists.txt index d3549a5c7..2775341eb 100644 --- a/src/runtime/Test/CMakeLists.txt +++ b/src/runtime/Test/CMakeLists.txt @@ -104,6 +104,12 @@ TARGET_LINK_LIBRARIES(runtimeTestEchoSrv runtime_echo ${OMNIORB_LIBRARIES}) ADD_EXECUTABLE(echo_clt ${echo_clt_SOURCES}) TARGET_LINK_LIBRARIES(echo_clt runtime_echo ${OMNIORB_LIBRARIES}) +if(WIN32) + add_library(TestComponentLocal_lib STATIC ${TestComponentLocal_SOURCES}) + TARGET_LINK_LIBRARIES(TestComponentLocal_lib ${_link_LIBRARIES}) + set_target_properties(TestComponentLocal_lib PROPERTIES OUTPUT_NAME TestComponentLocal) +endif(WIN32) + ADD_LIBRARY(TestComponentLocal ${TestComponentLocal_SOURCES}) TARGET_LINK_LIBRARIES(TestComponentLocal YACSlibEngine) diff --git a/src/salomegui_swig/CMakeLists.txt b/src/salomegui_swig/CMakeLists.txt index 4b7154555..1c32f1184 100644 --- a/src/salomegui_swig/CMakeLists.txt +++ b/src/salomegui_swig/CMakeLists.txt @@ -82,6 +82,11 @@ IF(SALOME_BUILD_DOC) ENDIF(SALOME_BUILD_DOC) # --- rules --- +IF(WIN32) + add_library(YACS_Swig_lib STATIC ${YACS_Swig_SOURCES}) + TARGET_LINK_LIBRARIES(YACS_Swig_lib ${_link_LIBRARIES}) + set_target_properties(YACS_Swig_lib PROPERTIES OUTPUT_NAME YACS_Swig) +ENDIF(WIN32) ADD_LIBRARY(YACS_Swig ${YACS_Swig_SOURCES}) TARGET_LINK_LIBRARIES(YACS_Swig ${_link_LIBRARIES}) INSTALL(TARGETS YACS_Swig EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})