# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
FILE(GLOB medcalculatorspython_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${medcalculatorspython_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
INSTALL(TARGETS _MEDCalculator DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDCalculator.py DESTINATION ${MED_salomescript_PYTHON})
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/MEDCalculator.py ${MED_salomescript_PYTHON})
ADD_SUBDIRECTORY(Client)
+INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_TARGET_PROPERTIES(_MEDCouplingCorba PROPERTIES COMPILE_FLAGS "${OMNIORB_FLAGS}")
INSTALL(TARGETS _MEDCouplingCorba DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingCorba.py DESTINATION ${MED_salomescript_PYTHON})
+SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingCorba.py)
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_TARGET_PROPERTIES(_MEDCouplingClient PROPERTIES COMPILE_FLAGS "${OMNIORB_FLAGS}")
INSTALL(TARGETS _MEDCouplingClient DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingClient.py DESTINATION ${MED_salomescript_PYTHON})
+SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingClient.py)
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
SWIG_ADD_MODULE(MEDCouplingRemapper python MEDCouplingRemapper.i)
SWIG_LINK_LIBRARIES(MEDCouplingRemapper ${PYTHON_LIBRARIES} medcouplingremapper)
-SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCoupling.py ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingRemapper.py)
+SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCoupling.py ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingRemapper.py ${CMAKE_CURRENT_SOURCE_DIR}/libMEDCoupling_Swig.py)
INSTALL(TARGETS _MEDCoupling _MEDCouplingRemapper DESTINATION ${MED_salomepythondir})
INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
+
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
)
INSTALL(TARGETS _MEDLoader DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDLoader.py DESTINATION ${MED_salomescript_PYTHON})
+SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDLoader.py ${CMAKE_CURRENT_SOURCE_DIR}/libMEDLoader_Swig.py)
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
ADD_TEST(MEDLoaderTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest.py)
ADD_TEST(MEDLoaderTest2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest2.py)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
INSTALL(TARGETS _libMEDSPLITTER_Swig DESTINATION ${MED_salomepythondir})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libMEDSPLITTER_Swig.py MEDSPLITTER.py test_MEDSPLITTER.py DESTINATION ${MED_salomescript_PYTHON})
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_SOURCE_DIR}/MEDSPLITTER.py ${MED_salomescript_PYTHON})
+
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SWIG_LINK_LIBRARIES(libMEDClient ${PYTHON_LIBRARIES} MEDClientcmodule)
SET_TARGET_PROPERTIES(_libMEDClient PROPERTIES COMPILE_FLAGS "${OMNIORB_FLAGS} ${HDF5_FLAGS} ${MED3_FLAGS} ${XDR_FLAGS}")
INSTALL(TARGETS _libMEDClient DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libMEDClient.py DESTINATION ${MED_salomescript_PYTHON})
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/libMEDClient.py ${MED_salomescript_PYTHON})
FILE(GLOB libMEDClient_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${libMEDClient_HEADERS_HXX} FIELDClient.cxx DESTINATION ${MED_salomeinclude_HEADERS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SWIG_LINK_LIBRARIES(libCompo2 ${PYTHON_LIBRARIES} MEDClientcmodule)
SET_TARGET_PROPERTIES(_libCompo2 PROPERTIES COMPILE_FLAGS "${OMNIORB_FLAGS} ${HDF5_FLAGS} ${MED3_FLAGS} ${XDR_FLAGS}")
INSTALL(TARGETS _libCompo2 DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libCompo2.py DESTINATION ${MED_salomescript_PYTHON})
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/libCompo2.py ${MED_salomescript_PYTHON})
FILE(GLOB libCompo2_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
INSTALL(FILES ${libCompo2_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES SWIG_FLAGS "-shadow")
INSTALL(TARGETS _ParaMEDMEM DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py DESTINATION ${MED_salomescript_PYTHON})
-
-ADD_TEST(MEDCouplingBasicsTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingBasicsTest.py)
-ADD_TEST(MEDCouplingRemapperTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingRemapperTest.py)
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py ${MED_salomescript_PYTHON})