From: Anthony Geay Date: Wed, 13 Dec 2017 06:17:28 +0000 (+0100) Subject: In progress X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6b4953a6517fdf70888d27dd9052de5cb0eccd1f;p=tools%2Fmedcoupling.git In progress --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0707aedc0..d4b67e82f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,6 +27,7 @@ ENDIF(MEDCOUPLING_BUILD_TESTS) ADD_SUBDIRECTORY(MEDCoupling) IF(MEDCOUPLING_ENABLE_PYTHON) ADD_SUBDIRECTORY(MEDCoupling_Swig) + ADD_SUBDIRECTORY(PyWrapping) ENDIF(MEDCOUPLING_ENABLE_PYTHON) IF(NOT MEDCOUPLING_MICROMED) diff --git a/src/PyWrapping/CMakeLists.txt b/src/PyWrapping/CMakeLists.txt index b162d2537..2f4d56e6b 100644 --- a/src/PyWrapping/CMakeLists.txt +++ b/src/PyWrapping/CMakeLists.txt @@ -51,5 +51,18 @@ INCLUDE_DIRECTORIES( ${PROJECT_BINARY_DIR}/doc ) + +IF(NOT MEDCOUPLING_MICROMED) + LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_MED_FILE) +ENDIF(NOT MEDCOUPLING_MICROMED) + SWIG_ADD_MODULE(medcoupling python medcoupling.i) -SWIG_LINK_LIBRARIES(medcoupling ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medloader medcouplingcpp) \ No newline at end of file +SWIG_LINK_LIBRARIES(medcoupling ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medloader medcouplingremapper) +SWIG_CHECK_GENERATION(medcoupling) +IF(WIN32) + SET_TARGET_PROPERTIES(_medcoupling PROPERTIES DEBUG_OUTPUT_NAME _medcoupling_d) +ENDIF(WIN32) + +INSTALL(TARGETS _medcoupling DESTINATION ${MEDCOUPLING_INSTALL_PYTHON}) +INSTALL(FILES medcoupling.i DESTINATION ${MEDCOUPLING_INSTALL_HEADERS}) +SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/medcoupling.py ${MEDCOUPLING_INSTALL_PYTHON}) diff --git a/src/PyWrapping/medcoupling.i b/src/PyWrapping/medcoupling.i index 87860614a..3d0f261b7 100644 --- a/src/PyWrapping/medcoupling.i +++ b/src/PyWrapping/medcoupling.i @@ -28,9 +28,9 @@ %include "MEDCouplingRemapperImpl.i" - // TO DO ifdef +#ifdef WITH_MED_FILE %include "MEDLoaderImpl.i" - // TO DO endif +#endif %pythoncode %{ def MEDCouplingDataArrayDoubleIadd(self,*args): @@ -130,4 +130,6 @@ def MEDCouplingDenseMatrixIsub(self,*args): %include "MEDCouplingFinalize.i" +#ifdef WITH_MED_FILE %include "MEDLoaderFinalize.i" +#endif