SWIG_ADD_LIBRARY(${MEDCouling_target_name} LANGUAGE python SOURCES MEDCoupling.i)
ENDIF()
+SWIG_LINK_LIBRARIES(${MEDCouling_target_name} ${PLATFORM_LIBS} medcouplingcpp)
IF(WIN32 OR CYGWIN)
- SWIG_LINK_LIBRARIES(${MEDCouling_target_name} ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medcouplingcpp)
-ELSE(WIN32 OR CYGWIN)
- # ${PYTHON_LIBRARIES} not needed see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
- SWIG_LINK_LIBRARIES(${MEDCouling_target_name} ${PLATFORM_LIBS} medcouplingcpp)
-ENDIF(WIN32 OR CYGWIN)
-# ${PYTHON_LIBRARIES} not needed
+ # PYTHON_LIBRARIES only needed on win32 see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
+ SWIG_LINK_LIBRARIES(${MEDCouling_target_name} ${PYTHON_LIBRARIES})
+ENDIF()
+
SWIG_CHECK_GENERATION(${MEDCouling_target_name})
SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES CPLUSPLUS ON)
IF(WIN32)
SWIG_ADD_LIBRARY(MEDCouplingRemapper LANGUAGE python SOURCES MEDCouplingRemapper.i)
ENDIF()
+SWIG_LINK_LIBRARIES(MEDCouplingRemapper medcouplingremapper)
IF(WIN32 OR CYGWIN)
- SWIG_LINK_LIBRARIES(MEDCouplingRemapper ${PYTHON_LIBRARIES} medcouplingremapper)
-ELSE(WIN32 OR CYGWIN)
- # ${PYTHON_LIBRARIES} not needed see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
- SWIG_LINK_LIBRARIES(MEDCouplingRemapper medcouplingremapper)
-ENDIF(WIN32 OR CYGWIN)
+ # PYTHON_LIBRARIES only needed on win32 see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
+ SWIG_LINK_LIBRARIES(MEDCouplingRemapper ${PYTHON_LIBRARIES})
+ENDIF()
IF(WIN32)
SET_TARGET_PROPERTIES(_MEDCouplingRemapper PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingRemapper_d)
SWIG_ADD_LIBRARY(MEDLoader LANGUAGE python SOURCES MEDLoader.i)
ENDIF()
-SWIG_LINK_LIBRARIES(MEDLoader ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medloader medcouplingcpp )
+SWIG_LINK_LIBRARIES(MEDLoader ${PLATFORM_LIBS} medloader medcouplingcpp)
+IF (WIN32 OR CYGWIN)
+ # PYTHON_LIBRARIES only needed on win32 see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
+ SWIG_LINK_LIBRARIES(MEDLoader ${PYTHON_LIBRARIES})
+ENDIF()
+
SWIG_CHECK_GENERATION(MEDLoader)
IF(WIN32)
SET_TARGET_PROPERTIES(_MEDLoader PROPERTIES DEBUG_OUTPUT_NAME _MEDLoader_d)
SWIG_ADD_LIBRARY(MEDPartitioner LANGUAGE python SOURCES MEDPartitioner.i)
ENDIF()
-SWIG_LINK_LIBRARIES(MEDPartitioner ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medpartitionercpp)
+SWIG_LINK_LIBRARIES(MEDPartitioner ${PLATFORM_LIBS} medpartitionercpp)
+IF (WIN32)
+ # PYTHON_LIBRARIES only needed on win32 see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
+ SWIG_LINK_LIBRARIES(MEDPartitioner ${PYTHON_LIBRARIES})
+ENDIF()
SWIG_CHECK_GENERATION(MEDPartitioner)
IF(WIN32)
SWIG_ADD_LIBRARY(ParaMEDMEM LANGUAGE python SOURCES ParaMEDMEM.i)
ENDIF()
-SWIG_LINK_LIBRARIES(ParaMEDMEM ${PYTHON_LIBRARIES} paramedmem)
+SWIG_LINK_LIBRARIES(ParaMEDMEM paramedmem)
+IF (WIN32)
+ # PYTHON_LIBRARIES only needed on win32 see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
+ SWIG_LINK_LIBRARIES(ParaMEDMEM ${PYTHON_LIBRARIES})
+ENDIF ()
SWIG_CHECK_GENERATION(ParaMEDMEM)
#
${CMAKE_CURRENT_SOURCE_DIR}/../ShapeRecogn/Swig
${PROJECT_BINARY_DIR}/doc
)
-
- IF(WIN32 OR CYGWIN)
- SET(medcoupling_LIB_dependancies ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medcouplingremapper medicoco)
- ELSE(WIN32 OR CYGWIN)
- # ${PYTHON_LIBRARIES} not needed see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
+
+
SET(medcoupling_LIB_dependancies ${PLATFORM_LIBS} medcouplingremapper medicoco)
- ENDIF(WIN32 OR CYGWIN)
-
+ IF(WIN32 OR CYGWIN)
+ # PYTHON_LIBRARIES only needed on win32 see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
+ LIST(APPEND medcoupling_LIB_dependancies ${PYTHON_LIBRARIES})
+ ENDIF()
+
IF(MEDCOUPLING_ENABLE_SHAPERECOGN)
LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_SHAPE_RECOGN)
LIST(APPEND medcoupling_LIB_dependancies shaperecogn)
SWIG_ADD_LIBRARY(MEDRenumber LANGUAGE python SOURCES MEDRenumber.i)
ENDIF()
-SWIG_LINK_LIBRARIES(MEDRenumber ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} renumbercpp)
+SWIG_LINK_LIBRARIES(MEDRenumber ${PLATFORM_LIBS} renumbercpp)
+IF (WIN32)
+ # PYTHON_LIBRARIES only needed on win32 see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
+ SWIG_LINK_LIBRARIES(MEDRenumber ${PYTHON_LIBRARIES})
+ENDIF()
SWIG_CHECK_GENERATION(MEDRenumber)
IF(WIN32)