]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
In progress
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Dec 2017 06:17:28 +0000 (07:17 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Dec 2017 06:17:28 +0000 (07:17 +0100)
src/CMakeLists.txt
src/PyWrapping/CMakeLists.txt
src/PyWrapping/medcoupling.i

index 0707aedc06d4e84828a6377b844dd297638e8e37..d4b67e82f2271c0738899d49d260503b11cec421 100644 (file)
@@ -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)
index b162d2537407cd109886aa787cc63825bca18dbd..2f4d56e6ba36d8de6711ad5671655d4cb3448c27 100644 (file)
@@ -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})
index 87860614a279a82b13a66f56127c82951407bd0e..3d0f261b728809783d5d22a318ed39481c5a90d5 100644 (file)
@@ -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