]> SALOME platform Git repositories - tools/py2cpp.git/commitdiff
Salome HOME
bos #33720: port PY2CPP to windows bos/33720 V9_11_0rc1 1/head
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 23 May 2023 07:27:53 +0000 (09:27 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 23 May 2023 07:27:53 +0000 (09:27 +0200)
src/CMakeLists.txt

index d3fda0a29029f1b2bca20c4c0dbb4a8251f433ac..8335a7e6405b79072fef74d007f08e3913de82aa 100644 (file)
@@ -45,7 +45,13 @@ SET(_py2cpp_headers
   py2cpp.hxx
 )
 
-ADD_LIBRARY(py2cpp ${_py2cpp_sources})
+if(WIN32)
+  add_library(py2cpp_lib STATIC  ${_py2cpp_sources})
+  TARGET_LINK_LIBRARIES(py2cpp_lib ${_link_LIBRARIES})
+  set_target_properties(py2cpp_lib PROPERTIES OUTPUT_NAME py2cpp)
+endif(WIN32)
+
+ADD_LIBRARY(py2cpp  ${_py2cpp_sources})
 TARGET_LINK_LIBRARIES(py2cpp ${_link_LIBRARIES})
 TARGET_INCLUDE_DIRECTORIES(py2cpp PUBLIC
                           $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
@@ -53,6 +59,7 @@ TARGET_INCLUDE_DIRECTORIES(py2cpp PUBLIC
 
 IF(WIN32)
   INSTALL(TARGETS py2cpp EXPORT Py2cppCfg LIBRARY DESTINATION lib ${CMAKE_INSTALL_LIBDIR}  RUNTIME DESTINATION bin ${CMAKE_INSTALL_BINDIR})
+  INSTALL(TARGETS py2cpp_lib DESTINATION lib)
 ELSE(WIN32)
   INSTALL(TARGETS py2cpp EXPORT Py2cppCfg LIBRARY DESTINATION lib)
 ENDIF(WIN32)