From: Nabil Ghodbane Date: Tue, 23 May 2023 07:27:53 +0000 (+0200) Subject: bos #33720: port PY2CPP to windows X-Git-Tag: V9_11_0rc1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=434246aa8b756464797624f4a1d46a2b3cd7f0e5;p=tools%2Fpy2cpp.git bos #33720: port PY2CPP to windows --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d3fda0a..8335a7e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 $ @@ -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)