FILE(GLOB_RECURSE interpkernel_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
FILE(GLOB_RECURSE interpkernel_HEADERS_TXX "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
INSTALL(FILES ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX} DESTINATION ${MED_salomeinclude_HEADERS})
+
+# Will be used for SWIG dependencies:
+SET (interpkernel_HEADERS_HXX PARENT_SCOPE)
+SET (interpkernel_HEADERS_TXX PARENT_SCOPE)
FILE(GLOB medcoupling_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
FILE(GLOB medcoupling_HEADERS_TXX "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
INSTALL(FILES ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX} DESTINATION ${MED_salomeinclude_HEADERS})
+
+# To allow usage as SWIG dependencies:
+SET(medcoupling_HEADERS_HXX PARENT_SCOPE)
+SET(medcoupling_HEADERS_TXX PARENT_SCOPE)
FILE(GLOB medcouplingcorba_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${medcouplingcorba_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+
+# To allow usage as SWIG dependencies:
+SET(medcouplingcorba_HEADERS_HXX PARENT_SCOPE)
SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET(MEDCouplingCorba_SWIG_DPYS_FILES
+ MEDCouplingCorbaTypemaps.i)
+
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
)
+# _ABR_ Ensure dependency mechanism on all SWIG files and headers
+SET (SWIG_MODULE_MEDCouplingCorba_EXTRA_DEPS ${MEDCouplingCorba_SWIG_DPYS_FILES}
+ ${medcouplingcorba_HEADERS_HXX}
+ ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX}
+ ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX})
+
SWIG_ADD_MODULE(MEDCouplingCorba python MEDCouplingCorba.i)
SWIG_LINK_LIBRARIES(MEDCouplingCorba ${PYTHON_LIBS} medcouplingcorba ${PLATFORM_LIBS})
SET_TARGET_PROPERTIES(_MEDCouplingCorba PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET (MEDCoupling_SWIG_DPYS_FILES
+ MEDCouplingCommon.i
+ MEDCouplingFinalize.i
+ MEDCouplingTypemaps.i)
+
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS} # pthread dependancy due to python2.7 library
${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/GaussPoints
)
+# _ABR_ Ensure dependency mechanism on all SWIG files and headers
+SET (SWIG_MODULE_MEDCoupling_EXTRA_DEPS ${MEDCoupling_SWIG_DPYS_FILES}
+ ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX}
+ ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX})
+
SWIG_ADD_MODULE(MEDCoupling python MEDCoupling.i)
SWIG_LINK_LIBRARIES(MEDCoupling ${PYTHON_LIBS} ${PLATFORM_LIBS} medcoupling)
-SET_TARGET_PROPERTIES(_MEDCoupling PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
+SET_TARGET_PROPERTIES(${SWIG_MODULE_MEDCoupling_REAL_NAME} PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+# _ABR_ Ensure dependency mechanism on all SWIG files and headers
+SET (SWIG_MODULE_MEDCouplingRemapper_EXTRA_DEPS ${MEDCoupling_SWIG_DPYS_FILES}
+ ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX}
+ ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX})
+
SWIG_ADD_MODULE(MEDCouplingRemapper python MEDCouplingRemapper.i)
SWIG_LINK_LIBRARIES(MEDCouplingRemapper ${PYTHON_LIBS} medcouplingremapper)
-SET_TARGET_PROPERTIES(_MEDCouplingRemapper PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
+SET_TARGET_PROPERTIES(${SWIG_MODULE_MEDCouplingRemapper_REAL_NAME} PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
IF(${MACHINE} STREQUAL WINDOWS)
SET_TARGET_PROPERTIES(_MEDCouplingRemapper PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingRemapper_d)
SET_TARGET_PROPERTIES(_MEDCoupling PROPERTIES DEBUG_OUTPUT_NAME _MEDCoupling_d)
ENDIF(${MACHINE} STREQUAL WINDOWS)
-INSTALL(TARGETS _MEDCoupling _MEDCouplingRemapper DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS ${SWIG_MODULE_MEDCoupling_REAL_NAME} ${SWIG_MODULE_MEDCouplingRemapper_REAL_NAME} DESTINATION ${MED_salomelib_LIBS})
SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCoupling.py ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingRemapper.py ${CMAKE_CURRENT_SOURCE_DIR}/libMEDCoupling_Swig.py)
INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
FILE(GLOB medloader_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${medloader_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+
+# To allow usage as SWIG dependencies:
+SET(medloader_HEADERS_HXX PARENT_SCOPE)
SET_SOURCE_FILES_PROPERTIES(MEDLoader.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDLoader.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET (MEDLoader_SWIG_DPYS_FILES
+ MEDLoaderCommon.i
+ MEDLoaderTypemaps.i)
+
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
${MED3_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/GaussPoints
)
+SET (SWIG_MODULE_MEDLoader_EXTRA_DEPS ${MEDLoader_SWIG_DPYS_FILES}
+ ${medloader_HEADERS_HXX}
+ ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX}
+ ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX})
+
SWIG_ADD_MODULE(MEDLoader python MEDLoader.i)
SWIG_LINK_LIBRARIES(MEDLoader ${PYTHON_LIBS} ${PLATFORM_LIBS} medloader medcoupling)
SET_TARGET_PROPERTIES(_MEDLoader PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
FILE(GLOB paramedmem_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${paramedmem_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+
+# To allow usage as SWIG dependencies:
+SET(paramedmem_HEADERS_HXX PARENT_SCOPE)
+
SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET (ParaMEDMEM_SWIG_DPYS_FILES
+ ParaMEDMEM.typemap)
+
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
${MED3_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
)
+SET (SWIG_MODULE_ParaMEDMEM_EXTRA_DEPS ${ParaMEDMEM_SWIG_DPYS_FILES}
+ ${paramedmem_HEADERS_HXX}
+ ${medloader_HEADERS_HXX}
+ ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX}
+ ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX})
+
SWIG_ADD_MODULE(ParaMEDMEM python ParaMEDMEM.i)
SWIG_LINK_LIBRARIES(ParaMEDMEM ${PYTHON_LIBS} paramedmem medloader)