# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+# TODO: write those in the new format, and load them via FIND_PACKAGE():
+#INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindPARMETIS.cmake)
+#INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindMETIS.cmake)
+#INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSCOTCH.cmake)
+#INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSPLITTER.cmake)
+#INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindRENUMBER.cmake)
+#IF(WIN32)
+# INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindXDR.cmake)
+#ENDIF(WIN32)
+
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
+PROJECT(SalomeMED C CXX)
-IF(COMMAND cmake_policy)
- cmake_policy(SET CMP0003 NEW)
-ENDIF(COMMAND cmake_policy)
+# Ensure a proper linker behavior:
+CMAKE_POLICY(SET CMP0003 NEW)
-ENABLE_TESTING()
-SET(VERSION "7.2.0")
-SET(VERSION_DEV "0")
-SET(WITH_MEDMEMGUI "0")
+# Versioning
+# ===========
+# Project name, upper case
+STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
-#Defining all options first
-option(SALOME_USE_MPI "Use MPI containers" OFF)
+SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 2)
+SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
+SET(${PROJECT_NAME_UC}_VERSION
+ ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
+# Temporary backward compatibility:
+SET(VERSION ${${PROJECT_NAME_UC}_VERSION})
+SET(XVERSION 0x0${${PROJECT_NAME_UC}_MAJOR_VERSION}0${${PROJECT_NAME_UC}_MINOR_VERSION}0${${PROJECT_NAME_UC}_PATCH_VERSION})
+SET(VERSION_DEV "0")
+#
+# User options
+# ============
+OPTION(SALOME_MED_STANDALONE "Build MED without CORBA bindings. When OFF, exchange to PARAVIS is disabled." OFF)
+OPTION(SALOME_MED_MICROMED "Build MED without MED file dependancy." OFF)
+OPTION(SALOME_MED_ENABLE_PYTHON "Build PYTHON bindings." ON)
+OPTION(SALOME_USE_MPI "To build ParaMEDMEM." OFF)
+OPTION(SALOME_BUILD_GUI "Build GUI of MED." ON)
+OPTION(SALOME_BUILD_TESTS "Build MED tests." ON)
+OPTION(SALOME_BUILD_DOC "Build MED doc." ON)
-SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR})
-IF(KERNEL_ROOT_DIR)
- FILE(TO_CMAKE_PATH $ENV{KERNEL_ROOT_DIR} KERNEL_ROOT_DIR)
- SET(MED_ENABLE_KERNEL ON)
-
- # directories for packages detection
- SET(SALOME_MACROS_DIR ${KERNEL_ROOT_DIR}/salome_adm/cmake_files)
- LIST(APPEND CMAKE_MODULE_PATH "${SALOME_MACROS_DIR}")
+#
+# Set list of prerequisites
+# =========================
+IF(NOT SALOME_MED_STANDALONE)
+ SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
+ IF(EXISTS ${KERNEL_ROOT_DIR})
+ LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
+ INCLUDE(SalomeMacros)
+ FIND_PACKAGE(SalomeKERNEL REQUIRED)
+ ELSE(EXISTS ${KERNEL_ROOT_DIR})
+ MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR or turn option SALOME_MED_STANDALONE to ON !")
+ ENDIF(EXISTS ${KERNEL_ROOT_DIR})
+ LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
+ FIND_PACKAGE(SalomeOmniORB REQUIRED)
+ELSE(NOT SALOME_MED_STANDALONE)
+ LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local_without_kernel/cmake_files")
INCLUDE(SalomeMacros)
- INCLUDE(SalomeSetupPlatform)
-
- FIND_PACKAGE(SalomeKERNEL)
-
- # Try first to find medfile version using the new CMake first
- FIND_PACKAGE(SalomeMedfile QUIET)
- IF(medfile_FOUND)
- MESSAGE(STATUS "Found Medfile in config mode (new CMake version of medfile)")
- # Backward compat:
- SET(MED_ENABLE_MED3 ON)
- SET(MED3_INCLUDE_DIRS "${MEDFILE_INCLUDE_DIRS}")
- SET(MED3_LIBS_C_ONLY "${MEDFILE_C_LIBRARIES}")
- ELSE()
- # if not found, revert to the old logic:
- FIND_PACKAGE(MEDFILE REQUIRED)
- SET(MED_ENABLE_MED3 ON)
- ENDIF()
-
- FIND_PACKAGE(SalomePThread)
- FIND_PACKAGE(SalomePython)
- SET(PYTHON_LIBS ${PYTHON_LIBRARIES})
-
- FIND_PACKAGE(SalomeOmniORB)
- FIND_PACKAGE(SalomeOmniORBPy)
- SET(OMNIORB_LIBS ${OMNIORB_LIBRARIES})
-
- IF(SALOME_USE_MPI)
- FIND_PACKAGE(SalomeMPI)
- SET(MPI_IS_OK 1)
- ENDIF()
-
- FIND_PACKAGE(SalomeHDF5)
- FIND_PACKAGE(SalomeBoost)
-
- FIND_PACKAGE(SalomeLibXml2)
- # Backward compat:
- SET(LIBXML_INCLUDE_DIRS "${LIBXML2_INCLUDE_DIR}")
- SET(LIBXML_LIBS "${LIBXML2_LIBRARIES}")
-
- FIND_PACKAGE(SalomeSWIG)
- SET(SWIG_STATUS TRUE)
-
- FIND_PACKAGE(SalomeCppUnit)
- SET(CPPUNIT_IS_OK ON)
- SET(CPPUNIT_LIBS "${CPPUNIT_LIBRARIES}")
-
- FIND_PACKAGE(SalomeDoxygen)
- FIND_PACKAGE(SalomeSphinx)
-
+ENDIF(NOT SALOME_MED_STANDALONE)
-
- SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR})
- FILE(TO_CMAKE_PATH "$ENV{GUI_ROOT_DIR}" GUI_ROOT_DIR)
- IF(GUI_ROOT_DIR)
- LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
- SET(MED_ENABLE_GUI ON)
-
- FIND_PACKAGE(SalomeGUI)
-
- FIND_PACKAGE(SalomeCAS)
- FIND_PACKAGE(SalomeOpenGL)
- FIND_PACKAGE(SalomeQt4)
-
- FIND_PACKAGE(SalomeQwt)
- FIND_PACKAGE(SalomePyQt4)
- ENDIF(GUI_ROOT_DIR)
-ELSE(KERNEL_ROOT_DIR)
- SET(SALOME_MACROS_DIR ${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files)
- LIST(APPEND CMAKE_MODULE_PATH "${SALOME_MACROS_DIR}")
-
- # TODO: the macros below should be loaded with a FIND_PACKAGE(), and should be sync'd with
- # what has been done in KERNEL + GUI:
-
- INCLUDE(FindPLATFORM)
- if(SALOME_USE_MPI)
- INCLUDE(FindMPI)
- endif(SALOME_USE_MPI)
- INCLUDE(FindMEDFILE)
- INCLUDE(FindBOOST)
- INCLUDE(FindCPPUNIT)
- INCLUDE(FindHDF5)
- INCLUDE(FindPYTHON)
- INCLUDE(FindLIBXML2)
- INCLUDE(FindPTHREADS)
- INCLUDE(FindSWIG)
- #INCLUDE(${CMAKE_SOURCE_DIR}/adm_local_without_kernel/cmake_files/FindMEDFILE.cmake)
-ENDIF(KERNEL_ROOT_DIR)
+IF(NOT SALOME_MED_MICROMED)
+ FIND_PACKAGE(SalomeHDF5 REQUIRED)
+ FIND_PACKAGE(SalomeMedfile REQUIRED)
+ENDIF(NOT SALOME_MED_MICROMED)
-# TODO: write those in the new format, and load them via FIND_PACKAGE():
-INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindPARMETIS.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindMETIS.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSCOTCH.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindSPLITTER.cmake)
-INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindRENUMBER.cmake)
-IF(WIN32)
- INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindXDR.cmake)
-ENDIF(WIN32)
-
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${VERSION}
- OUTPUT_VARIABLE XVERSION)
-
-# TODO: adjust to the global SALOME install dirs exposed from KERNEL:
-SET(MED_salomebin_BINS bin/salome)
-SET(MED_salomelib_LIBS lib/salome)
-SET(MED_salomeidl_IDLS idl/salome)
-SET(KERNEL_salomeidl_IDLS ${MED_salomeidl_IDLS})
-SET(MED_salomeinclude_HEADERS include/salome)
-SET(MED_salomeres_DATA share/salome/resources/med)
-SET(MED_salomeres_SCRIPTS share/salome/resources/med)
-SET(MED_salomescript_SCRIPTS bin/salome)
-SET(MED_salomescript_DATA bin/salome)
-SET(MED_salomescript_PYTHON bin/salome)
-SET(MED_appliskel_SCRIPTS bin/salome/appliskel)
-SET(MED_appliskel_PYTHON bin/salome/appliskel)
-SET(MED_pythondir lib/python${PYTHON_VERSION}/site-packages)
-SET(MED_salomepythondir ${MED_pythondir}/salome)
-SET(MED_sharedpkgpython_PYTHON ${MED_salomepythondir}/shared_modules)
-SET(MED_admlocalcmake adm_local/cmake_files)
-
-SET(KERNEL_salomescript_PYTHON ${MED_salomescript_PYTHON})
-SET(KERNEL_salomepythondir ${MED_salomepythondir})
-
-IF(MED_ENABLE_KERNEL)
- ADD_SUBDIRECTORY(idl)
-ELSE(MED_ENABLE_KERNEL)
- ADD_SUBDIRECTORY(adm_local_without_kernel)
-ENDIF(MED_ENABLE_KERNEL)
-ADD_SUBDIRECTORY(adm_local)
-ADD_SUBDIRECTORY(src)
-ADD_SUBDIRECTORY(doc)
-ADD_SUBDIRECTORY(resources)
-ADD_SUBDIRECTORY(bin)
+IF(SALOME_BUILD_GUI)
+ IF(NOT SALOME_MED_STANDALONE)
+ SET(GUI_ROOT_DIR $ENV{GUI_ROOT_DIR} CACHE PATH "Path to the Salome GUI")
+ IF(EXISTS ${GUI_ROOT_DIR})
+ LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files")
+ FIND_PACKAGE(SalomeGUI REQUIRED)
+ ELSE(EXISTS ${GUI_ROOT_DIR})
+ MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR or turn option SALOME_BUILD_GUI to OFF !")
+ ENDIF(EXISTS ${GUI_ROOT_DIR})
+ FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui)
+ FIND_PACKAGE(SalomeCAS REQUIRED) # maybe one day it will disappear ...
+ ENDIF(NOT SALOME_MED_STANDALONE)
+ENDIF(SALOME_BUILD_GUI)
+
+LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files")
+
+IF(SALOME_BUILD_TESTS)
+ ENABLE_TESTING()
+ FIND_PACKAGE(SalomeCppUnit REQUIRED)
+ENDIF(SALOME_BUILD_TESTS)
+
+IF(SALOME_USE_MPI)
+ FIND_PACKAGE(SalomeMPI REQUIRED)
+ENDIF(SALOME_USE_MPI)
+
+IF(SALOME_BUILD_DOC)
+ FIND_PACKAGE(SalomeDoxygen REQUIRED)
+ FIND_PACKAGE(SalomeGraphviz) # Remains optional even here.
+ FIND_PACKAGE(SalomeSphinx REQUIRED)
+ENDIF(SALOME_BUILD_DOC)
+
+IF(SALOME_MED_ENABLE_PYTHON)
+ FIND_PACKAGE(SalomePython REQUIRED)
+ FIND_PACKAGE(SalomeSWIG REQUIRED)
+ENDIF(SALOME_MED_ENABLE_PYTHON)
+
+IF(NOT SALOME_MED_MICROMED)
+ FIND_PACKAGE(SalomeMedfile REQUIRED)
+ENDIF(NOT SALOME_MED_MICROMED)
+
+
+# Directories
+#
+# Directories have to be given after prerequisites (to be able to use
+# Python version string for example).
+# ===========
+SET(SALOME_INSTALL_BINS bin/salome CACHE PATH "Install path: SALOME binaries")
+SET(SALOME_INSTALL_LIBS lib/salome CACHE PATH "Install path: SALOME libs")
+SET(SALOME_INSTALL_IDLS idl/salome CACHE PATH "Install path: SALOME IDL files")
+SET(SALOME_INSTALL_HEADERS include/salome CACHE PATH "Install path: SALOME headers")
+SET(SALOME_INSTALL_SCRIPT_SCRIPTS ${SALOME_INSTALL_BINS} CACHE PATH
+ "Install path: SALOME scripts")
+SET(SALOME_INSTALL_SCRIPT_DATA ${SALOME_INSTALL_BINS} CACHE PATH
+ "Install path: SALOME script data")
+SET(SALOME_INSTALL_SCRIPT_PYTHON ${SALOME_INSTALL_BINS} CACHE PATH
+ "Install path: SALOME Python scripts")
+SET(SALOME_INSTALL_APPLISKEL_SCRIPTS ${SALOME_INSTALL_BINS}/appliskel CACHE PATH
+ "Install path: SALOME application skeleton - scripts")
+SET(SALOME_INSTALL_APPLISKEL_PYTHON ${SALOME_INSTALL_BINS}/appliskel CACHE PATH
+ "Install path: SALOME application skeleton - Python")
+SET(SALOME_INSTALL_CMAKE adm_local/cmake_files CACHE PATH "Install path: SALOME CMake files")
+SET(SALOME_INSTALL_CMAKE_LOCAL adm_local/cmake_files CACHE PATH
+ "Install path: local SALOME CMake files")
+
+IF(SALOME_MED_ENABLE_PYTHON)
+ SET(_pydir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
+ SET(SALOME_INSTALL_PYTHON ${_pydir}/salome CACHE PATH "Install path: SALOME Python stuff")
+ SET(SALOME_INSTALL_PYTHON_SHARED ${SALOME_INSTALL_PYTHON}/shared_modules CACHE PATH
+ "Install path: SALOME Python shared modules")
+ENDIF(SALOME_MED_ENABLE_PYTHON)
+
+SET(SALOME_INSTALL_RES share/salome/resources CACHE PATH "Install path: SALOME resources")
+
+# Med specific:
+
+SET(SALOME_MED_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/med" CACHE PATH "Install path: SALOME MED specific data")
+SET(SALOME_MED_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/med" CACHE PATH "Install path: SALOME MED specific scripts")
-SET(input ${CMAKE_CURRENT_SOURCE_DIR}/MED_version.h.in)
-SET(output ${CMAKE_CURRENT_BINARY_DIR}/MED_version.h)
+MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS)
+MARK_AS_ADVANCED(SALOME_INSTALL_SCRIPT_SCRIPTS SALOME_INSTALL_SCRIPT_DATA SALOME_INSTALL_SCRIPT_PYTHON)
+MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS SALOME_INSTALL_APPLISKEL_PYTHON SALOME_INSTALL_CMAKE SALOME_INSTALL_CMAKE_LOCAL SALOME_INSTALL_RES)
+MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED SALOME_MED_INSTALL_RES_DATA SALOME_MED_INSTALL_RES_SCRIPTS)
+
+# Configuration of MED_version.h.in
+
+SET(input ${PROJECT_SOURCE_DIR}/MED_version.h.in)
+SET(output ${PROJECT_BINARY_DIR}/MED_version.h)
MESSAGE(STATUS "Creation of ${output}")
CONFIGURE_FILE(${input} ${output} @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MED_version.h DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MED_version.h DESTINATION ${SALOME_INSTALL_HEADERS})
+
+# Sources
+# ========
+
+ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(bin)
+ADD_SUBDIRECTORY(adm_local)
+
+IF(SALOME_BUILD_DOC)
+ ADD_SUBDIRECTORY(doc)
+ENDIF(SALOME_BUILD_DOC)
+
+IF(NOT SALOME_MED_STANDALONE)
+ ADD_SUBDIRECTORY(idl)
+ELSE(NOT SALOME_MED_STANDALONE)
+ ADD_SUBDIRECTORY(adm_local_without_kernel)
+ENDIF(NOT SALOME_MED_STANDALONE)
+
+IF(NOT SALOME_MED_MICROMED)
+ ADD_SUBDIRECTORY(resources)
+ENDIF(NOT SALOME_MED_MICROMED)
+
+# Configuration export
+# ====================
+INCLUDE(CMakePackageConfigHelpers)
+
+# List of targets in this project we want to make visible to the rest of the world.
+# They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
+SET(_${PROJECT_NAME}_exposed_targets
+ interpkernel medcoupling)
+
+IF(NOT SALOME_MED_MICROMED)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ medloader)
+ IF(SALOME_USE_MPI)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ paramedloader)
+ ENDIF(SALOME_USE_MPI)
+ENDIF(NOT SALOME_MED_MICROMED)
+
+IF(SALOME_USE_MPI)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ paramedmem)
+ENDIF(SALOME_USE_MPI)
+
+IF(NOT SALOME_MED_STANDALONE)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets
+ SalomeIDLMED medcouplingcorba )
+ENDIF(NOT SALOME_MED_STANDALONE)
+
+# Add all targets to the build-tree export set
+
+EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
+ FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
+
+# Create the configuration files:
+# - in the build tree:
+
+# Ensure the variables are always defined for the configure:
+
+SET(MEDFILE_ROOT_DIR "${MEDFILE_ROOT_DIR}")
+SET(HDF5_ROOT_DIR "${HDF5_ROOT_DIR}")
+SET(MPI_ROOT_DIR "${MPI_ROOT_DIR}")
+SET(OMNIORB_ROOT_DIR "${OMNIORB_ROOT_DIR}")
+SET(PTHREAD_ROOT_DIR "${PTHREAD_ROOT_DIR}")
+SET(SWIG_ROOT_DIR "${SWIG_ROOT_DIR}")
+SET(PYTHON_ROOT_DIR "${PYTHON_ROOT_DIR}")
+SET(CPPUNIT_ROOT_DIR "${CPPUNIT_ROOT_DIR}")
+SET(GRAPHVIZ_ROOT_DIR "${GRAPHVIZ_ROOT_DIR}")
+SET(DOXYGEN_ROOT_DIR "${DOXYGEN_ROOT_DIR}")
+SET(SPHINX_ROOT_DIR "${SPHINX_ROOT_DIR}")
+
+# - in the install tree:
+# Get the relative path of the include directory so
+# we can register it in the generated configuration files:
+SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
+CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in
+ ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
+ INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}"
+ PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX
+ MEDFILE_ROOT_DIR HDF5_ROOT_DIR OMNIORB_ROOT_DIR PTHREAD_ROOT_DIR
+ SWIG_ROOT_DIR PYTHON_ROOT_DIR CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR
+ SPHINX_ROOT_DIR)
+
+WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
+ VERSION ${${PROJECT_NAME_UC}_VERSION}
+ COMPATIBILITY AnyNewerVersion)
+
+# Install the CMake configuration files:
+INSTALL(FILES
+ "${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake"
+ "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
+ DESTINATION "${SALOME_INSTALL_CMAKE}")
+
+# Install the export set for use with the install-tree
+INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE}"
+ FILE ${PROJECT_NAME}Targets.cmake)
+
+###
+
+MACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC)
+ INSTALL(CODE "SET(PYTHON_FILE ${f})")
+ FOREACH(input ${PYFILE2COMPINST})
+ GET_FILENAME_COMPONENT(inputname ${input} NAME)
+ INSTALL(FILES ${input} DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYFILELOC})
+ INSTALL(CODE "MESSAGE(STATUS \"py compiling ${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}\")")
+ INSTALL(CODE "SET(CMD \"import py_compile ; py_compile.compile('${CMAKE_INSTALL_PREFIX}/${PYFILELOC}/${inputname}')\")")
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"\${CMD}\")")
+ INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -c \"\${CMD}\")")
+ ENDFOREACH(input ${PYFILE2COMPINST})
+ENDMACRO(INSTALL_AND_COMPILE_PYTHON_FILE PYFILE2COMPINST PYFILELOC)
FindSPLITTER.cmake
)
-INSTALL(FILES ${admlocal_cmake_DATA} DESTINATION ${MED_admlocalcmake})
+INSTALL(FILES ${admlocal_cmake_DATA} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL})
SET(output ${CMAKE_CURRENT_BINARY_DIR}/SALOMEconfig.h)
MESSAGE(STATUS "Creation of ${output}")
CONFIGURE_FILE(${input} ${output})
-INSTALL(FILES ${output} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${output} DESTINATION ${SALOME_INSTALL_HEADERS})
CONFIGURE_FILE(VERSION.in VERSION @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${MED_salomebin_BINS})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${SALOME_INSTALL_BINS})
MEDOPFactory.idl
)
-IF(MPI_IS_OK)
+IF(SALOME_USE_MPI)
SET(SalomeIDLMED_IDLSOURCES ${SalomeIDLMED_IDLSOURCES} ParaMEDMEMComponent.idl)
-ENDIF(MPI_IS_OK)
+ENDIF(SALOME_USE_MPI)
SET(SalomeIDLMEDTests_IDLSOURCES
MEDCouplingCorbaServantTest.idl
TARGET_LINK_LIBRARIES(SalomeIDLMEDTests SalomeIDLMED)
SET_TARGET_PROPERTIES(SalomeIDLMEDTests PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-INSTALL(TARGETS SalomeIDLMED SalomeIDLMEDTests DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS SalomeIDLMED SalomeIDLMEDTests DESTINATION ${SALOME_INSTALL_LIBS})
)
ENDIF(MED_ENABLE_GUI)
-INSTALL(FILES ${MED_RESOURCES_FILES} DESTINATION ${MED_salomeres_DATA})
+INSTALL(FILES ${MED_RESOURCES_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA})
MESSAGE(STATUS "Creation of ${CMAKE_CURRENT_BINARY_DIR}/MEDCatalog.xml")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/MEDCatalog.xml.in ${CMAKE_CURRENT_BINARY_DIR}/MEDCatalog.xml @ONLY)
MESSAGE(STATUS "Creation of ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml @ONLY)
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDCatalog.xml ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml DESTINATION ${MED_salomeres_DATA})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDCatalog.xml ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml DESTINATION ${SALOME_MED_INSTALL_RES_DATA})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-SET(COMMON_SUBDIRS INTERP_KERNEL MEDCoupling)
-SET(PARAMEDMEM_SUBDIRS)
-SET(OLD_COMMON_SUBDIRS)
+#TODO MEDPartitioner & RENUMBER
+ADD_SUBDIRECTORY(INTERP_KERNEL)
+ADD_SUBDIRECTORY(MEDCoupling)
-# INTERP_KERNELTest, MED, RENUMBER and MEDGUI will go from OLD_COMMON_SUBDIRS -> COMMON_SUBDIRS for Salome7
+IF(SALOME_MED_ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(MEDCoupling_Swig)
+ENDIF(SALOME_MED_ENABLE_PYTHON)
-IF(SWIG_STATUS)
- SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDCoupling_Swig)
-ENDIF(SWIG_STATUS)
+IF(NOT SALOME_MED_MICROMED)
+ ADD_SUBDIRECTORY(MEDLoader)
+ ADD_SUBDIRECTORY(RENUMBER)
+ IF(SALOME_BUILD_TESTS)
+ ADD_SUBDIRECTORY(INTERP_KERNELTest)
+ ENDIF(SALOME_BUILD_TESTS)
+ENDIF(NOT SALOME_MED_MICROMED)
-IF(MED_ENABLE_MED3)
- SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDLoader)
- SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
- IF(CPPUNIT_IS_OK)
- SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS} INTERP_KERNELTest )
- ENDIF(CPPUNIT_IS_OK)
- IF(SWIG_STATUS)
- SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
- ENDIF(SWIG_STATUS)
-ENDIF(MED_ENABLE_MED3)
+IF(SALOME_USE_MPI)
+ ADD_SUBDIRECTORY(ParaMEDMEM)
+ IF(NOT SALOME_MED_MICROMED)
+ ADD_SUBDIRECTORY(ParaMEDLoader)
+ ENDIF(NOT SALOME_MED_MICROMED)
+ IF(NOT SALOME_MED_STANDALONE)
+ ADD_SUBDIRECTORY(ParaMEDCouplingCorba)
+ ADD_SUBDIRECTORY(ParaMEDMEMComponent)
+ ENDIF(NOT SALOME_MED_STANDALONE)
+ IF(SALOME_MED_ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(ParaMEDMEM_Swig)
+ ENDIF(SALOME_MED_ENABLE_PYTHON)
+ IF(SALOME_BUILD_TESTS)
+ IF(NOT SALOME_MED_MICROMED)
+ ADD_SUBDIRECTORY(ParaMEDMEMTest)
+ ENDIF(NOT SALOME_MED_MICROMED)
+ ENDIF(SALOME_BUILD_TESTS)
+ENDIF(SALOME_USE_MPI)
-IF(MPI_IS_OK)
- SET(PARAMEDMEM_SUBDIRS ${PARAMEDMEM_SUBDIRS} ParaMEDMEM)
- IF(MED_ENABLE_MED3)
- SET(PARAMEDMEM_SUBDIRS ${PARAMEDMEM_SUBDIRS} ParaMEDLoader)
- IF(CPPUNIT_IS_OK)
- SET(PARAMEDMEM_SUBDIRS ${PARAMEDMEM_SUBDIRS} ParaMEDMEMTest)
- ENDIF(CPPUNIT_IS_OK)
- IF(SWIG_STATUS)
- SET(PARAMEDMEM_SUBDIRS ${PARAMEDMEM_SUBDIRS} ParaMEDMEM_Swig)
- ENDIF(SWIG_STATUS)
- ENDIF(MED_ENABLE_MED3)
-ENDIF(MPI_IS_OK)
+IF(NOT SALOME_MED_STANDALONE)
+ ADD_SUBDIRECTORY(MEDCouplingCorba)
+ ADD_SUBDIRECTORY(MEDCalculator)
+ IF(SALOME_MED_ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(MEDCouplingCorba_Swig)
+ ENDIF(SALOME_MED_ENABLE_PYTHON)
+ENDIF(NOT SALOME_MED_STANDALONE)
-IF(MED_ENABLE_SPLITTER)
- IF(MED_ENABLE_MED3)
- SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDPartitioner)
- SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
- IF(SWIG_STATUS)
- SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
- ENDIF(SWIG_STATUS)
- ENDIF(MED_ENABLE_MED3)
-ENDIF(MED_ENABLE_SPLITTER)
-
-IF(MED_ENABLE_RENUMBER)
- IF(MED_ENABLE_MED3)
- SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS} RENUMBER)
- ENDIF(MED_ENABLE_MED3)
-ENDIF(MED_ENABLE_RENUMBER)
-
-IF(MED_ENABLE_KERNEL)
- SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDCouplingCorba)
- IF(SWIG_STATUS)
- SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDCouplingCorba_Swig)
- SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
- ENDIF(SWIG_STATUS)
- SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
- IF(MPI_IS_OK)
- SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} ParaMEDCouplingCorba ParaMEDMEMComponent)
- ENDIF(MPI_IS_OK)
- IF(MED_ENABLE_MED3)
- SET(COMMON_SUBDIRS ${COMMON_SUBDIRS} MEDCalculator)
- SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS})
- ENDIF(MED_ENABLE_MED3)
- IF(MED_ENABLE_GUI)
- SET(OLD_COMMON_SUBDIRS ${OLD_COMMON_SUBDIRS} MEDOP MEDGUI)
- ENDIF(MED_ENABLE_GUI)
-ENDIF(MED_ENABLE_KERNEL)
-
-SET(SUBDIRS ${COMMON_SUBDIRS} ${PARAMEDMEM_SUBDIRS} ${OLD_COMMON_SUBDIRS})
-
-FOREACH(DIR ${SUBDIRS})
- ADD_SUBDIRECTORY(${DIR})
-ENDFOREACH(DIR ${SUBDIRS})
+IF(SALOME_BUILD_GUI)
+ IF(NOT SALOME_MED_STANDALONE)
+ IF(NOT SALOME_MED_MICROMED)
+ IF(SALOME_MED_ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(MEDGUI)
+ ADD_SUBDIRECTORY(MEDOP)
+ ENDIF(SALOME_MED_ENABLE_PYTHON)
+ ENDIF(NOT SALOME_MED_MICROMED)
+ ENDIF(NOT SALOME_MED_STANDALONE)
+ENDIF(SALOME_BUILD_GUI)
ADD_LIBRARY(interpkernel SHARED ${interpkernel_SOURCES})
SET_TARGET_PROPERTIES(interpkernel PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS} ${PLATFORM_MMAP}")
TARGET_LINK_LIBRARIES(interpkernel ${PLATFORM_LIBS})
-INSTALL(TARGETS interpkernel DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS interpkernel EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
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})
+INSTALL(FILES ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX} DESTINATION ${SALOME_INSTALL_HEADERS})
# Will be used for SWIG dependencies:
SET (interpkernel_HEADERS_HXX PARENT_SCOPE)
#
# Author : Anthony Geay (CEA/DEN)
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS})
+
INCLUDE_DIRECTORIES(
${CPPUNIT_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${XDR_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../MEDLoader
${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling
PerfTest.cxx
)
ADD_EXECUTABLE(PerfTest ${PerfTest_SOURCES})
- SET_TARGET_PROPERTIES(PerfTest PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
- TARGET_LINK_LIBRARIES(PerfTest InterpKernelTest ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
- INSTALL(TARGETS PerfTest DESTINATION ${MED_salomebin_BINS})
+ TARGET_LINK_LIBRARIES(PerfTest InterpKernelTest ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
+ INSTALL(TARGETS PerfTest DESTINATION ${SALOME_INSTALL_BINS})
ENDIF(NOT MED_ENABLE_MICROMED)
ADD_LIBRARY(InterpKernelTest SHARED ${InterpKernelTest_SOURCES})
-SET_TARGET_PROPERTIES(InterpKernelTest PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(InterpKernelTest medloader medcoupling interpkernel ${CPPUNIT_LIBS})
ADD_EXECUTABLE(TestINTERP_KERNEL ${TestINTERP_KERNEL_SOURCES})
-SET_TARGET_PROPERTIES(TestINTERP_KERNEL PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestINTERP_KERNEL InterpKernelTest ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestINTERP_KERNEL InterpKernelTest ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
ADD_TEST(TestINTERP_KERNEL TestINTERP_KERNEL)
-INSTALL(TARGETS TestINTERP_KERNEL DESTINATION ${MED_salomebin_BINS})
-INSTALL(TARGETS InterpKernelTest DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS TestINTERP_KERNEL DESTINATION ${SALOME_INSTALL_BINS})
+INSTALL(TARGETS InterpKernelTest DESTINATION ${SALOME_INSTALL_LIBS})
#
# Author : Anthony Geay (CEA/DEN)
-ADD_SUBDIRECTORY(Swig)
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS})
-IF(CPPUNIT_IS_OK)
+IF(SALOME_MED_ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(Swig)
+ENDIF(SALOME_MED_ENABLE_PYTHON)
+
+IF(SALOME_BUILD_TESTS)
ADD_SUBDIRECTORY(Test)
-ENDIF(CPPUNIT_IS_OK)
+ENDIF(SALOME_BUILD_TESTS)
INCLUDE_DIRECTORIES(
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
)
ADD_LIBRARY(medcalculator SHARED ${medcalculator_SOURCES})
-SET_TARGET_PROPERTIES(medcalculator PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(medcalculator medloader medcouplingcorba ${KERNEL_LDFLAGS}
${KERNEL_SALOMELocalTrace} ${KERNEL_SalomeNS} ${KERNEL_OpUtil}
- ${OMNIORB_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS medcalculator DESTINATION ${MED_salomelib_LIBS})
+ ${OMNIORB_LIBRARIES} ${PLATFORM_LIBRARIES})
+INSTALL(TARGETS medcalculator DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB medcalculator_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${medcalculator_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${medcalculator_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
#
# Author : Anthony Geay (CEA/DEN)
-INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
+ADD_DEFINITIONS(${PYTHON_DEFINITIONS})
+
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/..
)
ADD_LIBRARY(medcalculatorspython SHARED ${medcalculatorspython_SOURCES})
-TARGET_LINK_LIBRARIES(medcalculatorspython interpkernel ${PYTHON_LIBS})
-INSTALL(TARGETS medcalculatorspython DESTINATION ${MED_salomelib_LIBS})
+TARGET_LINK_LIBRARIES(medcalculatorspython interpkernel ${PYTHON_LIBRARIES})
+INSTALL(TARGETS medcalculatorspython DESTINATION ${SALOME_INSTALL_LIBS})
SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES SWIG_DEFINITIONS "-shadow")
ENDIF(NUMPY_STATUS)
SWIG_ADD_MODULE(MEDCalculator python MEDCalculator.i)
SWIG_LINK_LIBRARIES(MEDCalculator ${PYTHON_LIBS} medcalculator)
-SET_TARGET_PROPERTIES(_MEDCalculator PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS} ${PYTHON_DEFINITIONS}")
IF(WIN32)
SET_TARGET_PROPERTIES(_MEDCalculator PROPERTIES DEBUG_OUTPUT_NAME _MEDCalculator_d)
ENDIF(WIN32)
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 MEDCalculator.i MEDCalculatorTypemaps.i DESTINATION ${MED_salomeinclude_HEADERS})
-INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/MEDCalculator.py ${MED_salomescript_PYTHON})
+INSTALL(FILES ${medcalculatorspython_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(TARGETS _MEDCalculator DESTINATION ${SALOME_INSTALL_PYTHON})
+INSTALL(FILES MEDCalculator.i MEDCalculatorTypemaps.i DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/MEDCalculator.py ${SALOME_INSTALL_PYTHON})
#
# Author : Anthony Geay (CEA/DEN)
+ADD_DEFINITIONS(${CPPUNIT_DEFINITIONS})
+
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
${CPPUNIT_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/../Swig
${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
)
ADD_EXECUTABLE(TestMEDCalculator ${TestMEDCalculator_SOURCES})
-SET_TARGET_PROPERTIES(TestMEDCalculator PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCalculator medcalculatorspython medcalculator ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestMEDCalculator medcalculatorspython medcalculator ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBRARIES})
ADD_TEST(TestMEDCalculator TestMEDCalculator)
-INSTALL(TARGETS TestMEDCalculator DESTINATION ${MED_salomebin_BINS})
+INSTALL(TARGETS TestMEDCalculator DESTINATION ${SALOME_INSTALL_BINS})
#
# Author : Anthony Geay (CEA/DEN)
-IF(CPPUNIT_STATUS)
+IF(SALOME_BUILD_TESTS)
ADD_SUBDIRECTORY(Test)
-ENDIF(CPPUNIT_STATUS)
+ENDIF(SALOME_BUILD_TESTS)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}/../..
ADD_LIBRARY(medcoupling SHARED ${medcoupling_SOURCES})
SET_TARGET_PROPERTIES(medcoupling PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(medcoupling interpkernel)
-INSTALL(TARGETS medcoupling DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS medcoupling EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
ADD_LIBRARY(medcouplingremapper SHARED ${medcouplingremapper_SOURCES})
TARGET_LINK_LIBRARIES(medcouplingremapper medcoupling)
SET_TARGET_PROPERTIES(medcouplingremapper PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
-INSTALL(TARGETS medcouplingremapper DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS medcouplingremapper DESTINATION ${SALOME_INSTALL_LIBS})
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})
+INSTALL(FILES ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX} DESTINATION ${SALOME_INSTALL_HEADERS})
# To allow usage as SWIG dependencies:
SET(medcoupling_HEADERS_HXX PARENT_SCOPE)
ADD_EXECUTABLE(TestMEDCoupling ${TestMEDCoupling_SOURCES})
SET_TARGET_PROPERTIES(TestMEDCoupling PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCoupling medcoupling ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestMEDCoupling medcoupling ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
ADD_TEST(TestMEDCoupling TestMEDCoupling)
ADD_EXECUTABLE(TestMEDCouplingRemapper ${TestMEDCouplingRemapper_SOURCES})
SET_TARGET_PROPERTIES(TestMEDCouplingRemapper PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCouplingRemapper medcouplingremapper ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestMEDCouplingRemapper medcouplingremapper ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
ADD_TEST(TestMEDCouplingRemapper TestMEDCouplingRemapper)
ADD_EXECUTABLE(TestMEDCouplingExamples ${TestMEDCouplingExamples_SOURCES})
SET_TARGET_PROPERTIES(TestMEDCouplingExamples PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCouplingExamples medcoupling ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestMEDCouplingExamples medcoupling ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
ADD_TEST(TestMEDCouplingExamples TestMEDCouplingExamples)
-INSTALL(TARGETS TestMEDCoupling TestMEDCouplingRemapper DESTINATION ${MED_salomebin_BINS})
+INSTALL(TARGETS TestMEDCoupling TestMEDCouplingRemapper DESTINATION ${SALOME_INSTALL_BINS})
#
# Author : Anthony Geay (CEA/DEN)
+ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS})
+
ADD_SUBDIRECTORY(Client)
-IF (CPPUNIT_IS_OK)
+IF(SALOME_BUILD_TESTS)
ADD_SUBDIRECTORY(Test)
-ENDIF (CPPUNIT_IS_OK)
+ENDIF(SALOME_BUILD_TESTS)
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
)
ADD_LIBRARY(medcouplingcorba SHARED ${medcouplingcorba_SOURCES})
-SET_TARGET_PROPERTIES(medcouplingcorba PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(medcouplingcorba medcoupling SalomeIDLMED ${PLATFORM_LIBS})
-INSTALL(TARGETS medcouplingcorba DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS medcouplingcorba DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB medcouplingcorba_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${medcouplingcorba_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${medcouplingcorba_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
# To allow usage as SWIG dependencies:
SET(medcouplingcorba_HEADERS_HXX PARENT_SCOPE)
)
ADD_LIBRARY(medcouplingclient SHARED ${medcouplingclient_SOURCES})
-SET_TARGET_PROPERTIES(medcouplingclient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(medcouplingclient medcoupling SalomeIDLMED ${OMNIORB_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS medcouplingclient DESTINATION ${MED_salomelib_LIBS})
+TARGET_LINK_LIBRARIES(medcouplingclient medcoupling SalomeIDLMED ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
+INSTALL(TARGETS medcouplingclient DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB medcouplingclient_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${medcouplingclient_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${medcouplingclient_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
)
ADD_EXECUTABLE(TestMEDCouplingCorbaServ ${TestMEDCouplingCorbaServ_SOURCES})
-SET_TARGET_PROPERTIES(TestMEDCouplingCorbaServ PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCouplingCorbaServ medcouplingcorba SalomeIDLMEDTests ${OMNIORB_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestMEDCouplingCorbaServ medcouplingcorba SalomeIDLMEDTests ${OMNIORB_LIBRARIES} ${PLATFORM_LIBRARIES})
SET(TestMEDCouplingCorbaClt_SOURCES
TestMEDCouplingCorbaClt.cxx
)
ADD_EXECUTABLE(TestMEDCouplingCorbaClt ${TestMEDCouplingCorbaClt_SOURCES})
-SET_TARGET_PROPERTIES(TestMEDCouplingCorbaClt PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCouplingCorbaClt medcouplingclient SalomeIDLMEDTests ${OMNIORB_LIBS} ${CPPUNIT_LIBS} ${PLATFORM_LIBS} ${PTHREAD_LIBS})
+SET_TARGET_PROPERTIES(TestMEDCouplingCorbaClt PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(TestMEDCouplingCorbaClt medcouplingclient SalomeIDLMEDTests ${OMNIORB_LIBRARIES} ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBRARIES} ${PTHREAD_LIBRARIES})
-INSTALL(TARGETS TestMEDCouplingCorbaServ TestMEDCouplingCorbaClt DESTINATION ${MED_salomebin_BINS})
+INSTALL(TARGETS TestMEDCouplingCorbaServ TestMEDCouplingCorbaClt DESTINATION ${SALOME_INSTALL_BINS})
ADD_SUBDIRECTORY(Client)
-INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_TARGET_PROPERTIES(_MEDCouplingCorba PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingCorba_d)
ENDIF(WIN32)
-INSTALL(TARGETS _MEDCouplingCorba DESTINATION ${MED_salomepythondir})
-INSTALL(FILES MEDCouplingCorba.i MEDCouplingCorbaTypemaps.i DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(TARGETS _MEDCouplingCorba DESTINATION ${SALOME_INSTALL_PYTHON})
+INSTALL(FILES MEDCouplingCorba.i MEDCouplingCorbaTypemaps.i DESTINATION ${SALOME_INSTALL_HEADERS})
SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingCorba.py)
-INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${SALOME_INSTALL_PYTHON})
#
# Author : Anthony Geay (CEA/DEN)
-INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_TARGET_PROPERTIES(_MEDCouplingClient PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingClient_d)
ENDIF(WIN32)
-INSTALL(TARGETS _MEDCouplingClient DESTINATION ${MED_salomepythondir})
-INSTALL(FILES MEDCouplingClient.i DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(TARGETS _MEDCouplingClient DESTINATION ${SALOME_INSTALL_PYTHON})
+INSTALL(FILES MEDCouplingClient.i DESTINATION ${SALOME_INSTALL_HEADERS})
SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingClient.py)
-INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${SALOME_INSTALL_PYTHON})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
-
-FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES CPLUSPLUS ON)
SET_TARGET_PROPERTIES(_MEDCouplingRemapper PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingRemapper_d)
SET_TARGET_PROPERTIES(_MEDCoupling PROPERTIES DEBUG_OUTPUT_NAME _MEDCoupling_d)
ENDIF(WIN32)
-INSTALL(TARGETS ${SWIG_MODULE_MEDCoupling_REAL_NAME} ${SWIG_MODULE_MEDCouplingRemapper_REAL_NAME} DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS ${SWIG_MODULE_MEDCoupling_REAL_NAME} ${SWIG_MODULE_MEDCouplingRemapper_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON})
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})
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${SALOME_INSTALL_SCRIPT_PYTHON})
-INSTALL(FILES MEDCoupling.i MEDCouplingCommon.i MEDCouplingMemArray.i MEDCouplingFinalize.i MEDCouplingRemapper.i MEDCouplingTypemaps.i DESTINATION ${MED_salomeinclude_HEADERS})
-INSTALL(FILES MEDCouplingBasicsTest.py MEDCouplingRemapperTest.py MEDCouplingDataForTest.py MEDCouplingNumPyTest.py DESTINATION ${MED_salomescript_PYTHON})
+INSTALL(FILES MEDCoupling.i MEDCouplingCommon.i MEDCouplingMemArray.i MEDCouplingFinalize.i MEDCouplingRemapper.i MEDCouplingTypemaps.i DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL(FILES MEDCouplingBasicsTest.py MEDCouplingRemapperTest.py MEDCouplingDataForTest.py MEDCouplingNumPyTest.py DESTINATION ${SALOME_INSTALL_SCRIPT_PYTHON})
ADD_TEST(MEDCouplingBasicsTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingBasicsTest.py)
ADD_TEST(MEDCouplingExamplesTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingExamplesTest.py)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
INCLUDE(${QT_USE_FILE})
INCLUDE(UseQt4Ext)
)
ADD_LIBRARY(MEDGUI SHARED ${MEDGUI_SOURCES} ${MEDGUI_HEADERS_MOC} ${MEDGUI_FORMS_HEADERS})
-SET_TARGET_PROPERTIES(MEDGUI PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(MEDGUI medcalculator ${QT_MT_LIBS} ${CAS_KERNEL} ${BOOST_LIBS} ${GUI_LDFLAGS} ${SalomeApp} ${CAM} ${LightApp} ${qtx} ${suit} ${SalomeObject} ${PLATFORM_LIBS} ${SalomeLifeCycleCORBA})
-INSTALL(TARGETS MEDGUI DESTINATION ${MED_salomelib_LIBS})
+TARGET_LINK_LIBRARIES(MEDGUI medcalculator ${QT_MT_LIBS} ${CAS_KERNEL} ${BOOST_LIBRARIES} ${GUI_LDFLAGS} ${SalomeApp} ${CAM} ${LightApp} ${qtx} ${suit} ${SalomeObject} ${PLATFORM_LIBS} ${SalomeLifeCycleCORBA})
+INSTALL(TARGETS MEDGUI DESTINATION ${SALOME_INSTALL_LIBS})
QT4_INSTALL_TS_RESOURCES("${MEDGUITS_SOURCES}" "${MED_salomeres_DATA}")
#
# Author : Anthony Geay (CEA/DEN)
-ADD_SUBDIRECTORY(Swig)
-IF(CPPUNIT_STATUS)
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${PLATFORM_DEFINITIONS})
+
+IF(SALOME_MED_ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(Swig)
+ENDIF(SALOME_MED_ENABLE_PYTHON)
+
+IF(SALOME_BUILD_TESTS)
ADD_SUBDIRECTORY(Test)
-ENDIF(CPPUNIT_STATUS)
+ENDIF(SALOME_BUILD_TESTS)
INCLUDE_DIRECTORIES(
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling
${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
)
ADD_LIBRARY(medloader SHARED ${medloader_SOURCES})
-SET_TARGET_PROPERTIES(medloader PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(medloader medcoupling ${MED3_LIBS_C_ONLY} ${HDF5_LIBS})
-INSTALL(TARGETS medloader DESTINATION ${MED_salomelib_LIBS})
+SET_TARGET_PROPERTIES(medloader PROPERTIES COMPILE_FLAGS "")
+TARGET_LINK_LIBRARIES(medloader medcoupling ${MEDFILE_C_LIBRARIES} ${HDF5_LIBRARIES})
+INSTALL(TARGETS medloader DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB medloader_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${medloader_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${medloader_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
# To allow usage as SWIG dependencies:
SET(medloader_HEADERS_HXX PARENT_SCOPE)
#
# Author : Anthony Geay (CEA/DEN)
-INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
-
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/..
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} ${PYTHON_DEFINITIONS}")
IF(WIN32)
SET_TARGET_PROPERTIES(_MEDLoader PROPERTIES DEBUG_OUTPUT_NAME _MEDLoader_d)
ENDIF(WIN32)
-INSTALL(TARGETS _MEDLoader DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS _MEDLoader DESTINATION ${SALOME_INSTALL_PYTHON})
-INSTALL(FILES MEDLoader.i MEDLoaderTypemaps.i MEDLoaderCommon.i DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES MEDLoader.i MEDLoaderTypemaps.i MEDLoaderCommon.i DESTINATION ${SALOME_INSTALL_HEADERS})
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})
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${SALOME_INSTALL_BINS})
-INSTALL(FILES MEDLoaderDataForTest.py MEDLoaderTest.py MEDLoaderTest2.py MEDLoaderTest3.py MEDLoaderCouplingTrainingSession.py CaseIO.py CaseReader.py CaseWriter.py VTKReader.py MEDLoaderSplitter.py medutilities.py DESTINATION ${MED_salomescript_PYTHON})
-INSTALL(FILES med2sauv PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MED_salomescript_PYTHON} )
-INSTALL(FILES sauv2med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MED_salomescript_PYTHON} )
-INSTALL(FILES case2med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MED_salomescript_PYTHON} )
-INSTALL(FILES med2case PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MED_salomescript_PYTHON} )
+INSTALL(FILES MEDLoaderDataForTest.py MEDLoaderTest.py MEDLoaderTest2.py MEDLoaderTest3.py MEDLoaderCouplingTrainingSession.py CaseIO.py CaseReader.py CaseWriter.py VTKReader.py MEDLoaderSplitter.py medutilities.py DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS})
+INSTALL(FILES med2sauv PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${SALOME_INSTALL_BINS} )
+INSTALL(FILES sauv2med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${SALOME_INSTALL_BINS} )
+INSTALL(FILES case2med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${SALOME_INSTALL_BINS} )
+INSTALL(FILES med2case PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${SALOME_INSTALL_BINS} )
ADD_TEST(MEDLoaderTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest.py)
ADD_TEST(MEDLoaderTest2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest2.py)
INCLUDE_DIRECTORIES(
${CPPUNIT_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL
)
ADD_EXECUTABLE(TestMEDLoader ${TestMEDLoader_SOURCES})
-SET_TARGET_PROPERTIES(TestMEDLoader PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDLoader medloader ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestMEDLoader medloader ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
ADD_TEST(TestMEDLoader TestMEDLoader)
ADD_EXECUTABLE(TestSauvLoader ${TestSauvLoader_SOURCES})
-SET_TARGET_PROPERTIES(TestSauvLoader PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestSauvLoader medloader ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
+TARGET_LINK_LIBRARIES(TestSauvLoader medloader ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
ADD_TEST(TestSauvLoader TestSauvLoader)
-INSTALL(TARGETS TestMEDLoader TestSauvLoader DESTINATION ${MED_salomebin_BINS})
+INSTALL(TARGETS TestMEDLoader TestSauvLoader DESTINATION ${SALOME_INSTALL_BINS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${PTHREAD_INCLUDE_DIRS}
${KERNEL_ROOT_DIR}/include/salome
${SalomeGenericObj}
medcoupling
interpkernel
- ${MED3_LIBS_C_ONLY}
- ${HDF5_LIBS}
- ${OMNIORB_LIBS}
- ${PLATFORM_LIBS}
+ ${MEDFILE_C_LIBRARIES}
+ ${HDF5_LIBRARIES}
+ ${OMNIORB_LIBRARIES}
+ ${PLATFORM_LIBRARIES}
)
-SET(COMMON_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
+
# This undefines the macros MIN and MAX which are specified in the windows headers
IF(WIN32)
SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOMINMAX")
SET_TARGET_PROPERTIES(MEDOPFactoryEngine PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
TARGET_LINK_LIBRARIES(MEDOPFactoryEngine SalomeIDLMED ${COMMON_LIBS})
-INSTALL(TARGETS MEDOPFactoryEngine DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS MEDOPFactoryEngine DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB MEDOPFactoryEngine_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${MEDOPFactoryEngine_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${MEDOPFactoryEngine_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
-INSTALL(FILES test_medop_components.py PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MED_salomebin_BINS}/xmed)
+INSTALL(FILES test_medop_components.py PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${SALOME_INSTALL_BINS}/xmed)
SalomeApp.xml
)
-INSTALL(FILES ${MED_RESOURCES_FILES} DESTINATION ${MED_salomebin_BINS}/med/appligen)
+INSTALL(FILES ${MED_RESOURCES_FILES} DESTINATION ${SALOME_INSTALL_BINS}/med/appligen)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/appligen.sh.in ${CMAKE_CURRENT_BINARY_DIR}/appligen.sh @ONLY)
${CMAKE_CURRENT_BINARY_DIR}/appligen.sh
)
-INSTALL(FILES ${MED_RESOURCES_FILES2} DESTINATION ${MED_salomebin_BINS}/med/appligen PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ)
+INSTALL(FILES ${MED_RESOURCES_FILES2} DESTINATION ${SALOME_INSTALL_BINS}/med/appligen PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ)
xmedimages.py
)
-INSTALL(FILES ${MED_PYTHON_SCRIPTS} DESTINATION ${MED_salomebin_BINS}/med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ)
+INSTALL(FILES ${MED_PYTHON_SCRIPTS} DESTINATION ${SALOME_INSTALL_BINS}/med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+ADD_DEFINITIONS(${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
INCLUDE(${QT_USE_FILE})
SET(QT_LIBS "${QT_LIBRARIES}")
INCLUDE(UseQt4Ext)
MED_msg_en.ts
MED_msg_fr.ts
)
-SET(COMMON_DEFINITIONS "${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
+
SET(COMMON_FLAGS
${CAS_KERNEL}
- ${QT_MT_LIBS}
+ ${QT_MT_LIBRARIES}
${OMNIORB_LIBRARIES}
- ${PLATFORM_LIBS}
- ${BOOST_LIBS}
+ ${PLATFORM_LIBRARIES}
+ ${BOOST_LIBRARIES}
SalomeIDLMED
MEDOPGUI_dialogs
MEDOPFactoryEngine
${SalomeGuiHelpers}
)
-#-D__WITH_MEDMEMGUI__ libMEDGUI.la
+ADD_LIBRARY(MEDOPGUI SHARED ${MEDOPGUI_SOURCES} ${MEDOPGUI_HEADERS_MOC})
IF(WITH_MEDMEMGUI)
- SET(COMMON_DEFINITIONS "${COMMON_DEFINITIONS} -D__WITH_MEDMEMGUI__")
- SET(COMMON_FLAGS ${COMMON_FLAGS} MEDGUI)
+ SET_TARGET_PROPERTIES(MEDOPGUI PROPERTIES COMPILE_FLAGS "-D__WITH_MEDMEMGUI__")
ENDIF(WITH_MEDMEMGUI)
-
-ADD_LIBRARY(MEDOPGUI SHARED ${MEDOPGUI_SOURCES} ${MEDOPGUI_HEADERS_MOC})
-SET_TARGET_PROPERTIES(MEDOPGUI PROPERTIES COMPILE_FLAGS ${COMMON_DEFINITIONS})
TARGET_LINK_LIBRARIES(MEDOPGUI ${COMMON_FLAGS})
-INSTALL(TARGETS MEDOPGUI DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS MEDOPGUI DESTINATION ${SALOME_INSTALL_LIBS})
QT4_INSTALL_TS_RESOURCES("${MEDOPGUITS_SOURCES}" "${MED_salomeres_DATA}")
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+ADD_DEFINITIONS(${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
INCLUDE(UseQt4Ext)
MACRO (QT4_WRAP_UI_XX outfiles )
)
ADD_LIBRARY(MEDOPGUI_dialogs SHARED ${MEDOPGUI_dialogs_SOURCES} ${MEDOPGUI_dialogs_HEADERS_MOC} ${MEDOPGUI_dialogs_FORMS_HEADERS})
-SET_TARGET_PROPERTIES(MEDOPGUI_dialogs PROPERTIES COMPILE_FLAGS "${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(MEDOPGUI_dialogs ${CAS_KERNEL} ${QT_LIBS} ${KERNEL_SalomeIDLKernel}
- ${GUI_SalomeGuiHelpers} ${OMNIORB_LIBS} ${GUI_qtx} ${GUI_suit} ${PLATFORM_LIBS}
+TARGET_LINK_LIBRARIES(MEDOPGUI_dialogs ${CAS_KERNEL} ${QT_LIBRARIES} ${KERNEL_SalomeIDLKernel}
+ ${GUI_SalomeGuiHelpers} ${OMNIORB_LIBRARIES} ${GUI_qtx} ${GUI_suit} ${PLATFORM_LIBRARIES}
${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SalomeKernelHelpers} ${GUI_SalomeGuiHelpers})
-INSTALL(TARGETS MEDOPGUI_dialogs DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS MEDOPGUI_dialogs DESTINATION ${SALOME_INSTALL_LIBS})
#
# ---------------------------------------------------------
# ---------------------------------------------------------
#
ADD_EXECUTABLE(dlgTester dlgTester.cxx)
-SET_TARGET_PROPERTIES(dlgTester PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
TARGET_LINK_LIBRARIES(dlgTester MEDOPGUI_dialogs ${QT_LIBS} ${PLATFORM_LIBS})
-INSTALL(TARGETS dlgTester DESTINATION ${MED_salomebin_BINS})
+INSTALL(TARGETS dlgTester DESTINATION ${SALOME_INSTALL_BINS})
#ADD_TEST(dlgTester dlgTester)
FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
padderoutput.med
)
-INSTALL(FILES ${MED_FILES} DESTINATION ${MED_salomeres_DATA}/medop_testfiles)
+INSTALL(FILES ${MED_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/medop_testfiles)
SET(MED_IMG_FILES
irm_test1.png
champ_altitude_MAP.pgm
)
-INSTALL(FILES ${MED_IMG_FILES} DESTINATION ${MED_salomeres_DATA}/medop_testfiles)
+INSTALL(FILES ${MED_IMG_FILES} DESTINATION ${SALOME_MED_INSTALL_RES_DATA}/medop_testfiles)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
-
SET(PYFILES_TO_INSTALL
__init__.py
fieldproxy.py
tests/test_xmed_visualisation.py
)
-INSTALL(FILES ${TEST_SCRIPTS_XMED} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MED_salomebin_BINS}/xmed)
\ No newline at end of file
+INSTALL(FILES ${TEST_SCRIPTS_XMED} PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${SALOME_INSTALL_BINS}/xmed)
\ No newline at end of file
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-IF(CPPUNIT_IS_OK)
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${LIBXML_DEFINITIONS} ${MPI_DEFINITIONS})
+
+IF(SALOME_BUILD_TESTS)
ADD_SUBDIRECTORY(Test)
-ENDIF(CPPUNIT_IS_OK)
+ENDIF(SALOME_BUILD_TESTS)
INCLUDE_DIRECTORIES(
${PARMETIS_INCLUDE_DIRS}
${SCOTCH_INCLUDE_DIRS}
${METIS_INCLUDE_DIRS}
${LIBXML_INCLUDE_DIRS}
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${MPI_INCLUDE_DIRS}
${PTHREADS_INCLUDE_DIRS}
MEDPARTITIONER_metis.c
)
-SET(medpartitionercpp_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${LIBXML_DEFINITIONS} ${MPI_DEFINITIONS}")
SET(medpartitionercpp_LDFLAGS
- ${MED3_LIBS_C_ONLY}
- ${HDF5_LIBS}
+ ${MEDFILE_C_LIBRARIES}
+ ${HDF5_LIBRARIES}
${STDLIB}
- ${LIBXML_LIBS}
- ${MPI_LIBS}
+ ${LIBXML_LIBRARIES}
+ ${MPI_LIBRARIES}
interpkernel
medcoupling
medloader
SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${SCOTCH_LIBS})
ENDIF(MED_ENABLE_SCOTCH)
-IF(MPI_IS_OK)
+IF(SALOME_USE_MPI)
SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES}
MEDPARTITIONER_UtilsPara.cxx
MEDPARTITIONER_JointFinder.cxx
)
-ENDIF(MPI_IS_OK)
+ENDIF(SALOME_USE_MPI)
ADD_LIBRARY(medpartitionercpp SHARED ${medpartitionercpp_SOURCES})
SET_TARGET_PROPERTIES(medpartitionercpp PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS} ${medpartitionercpp_DEFINITIONS}")
TARGET_LINK_LIBRARIES(medpartitionercpp ${medpartitionercpp_LDFLAGS} ${PLATFORM_LIBS} ${PTHREAD_LIBS})
-INSTALL(TARGETS medpartitionercpp DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS medpartitionercpp DESTINATION ${SALOME_INSTALL_LIBS})
IF(MED_ENABLE_PARMETIS)
ADD_EXECUTABLE(medpartitioner_para medpartitioner_para.cxx)
SET_TARGET_PROPERTIES(medpartitioner_para PROPERTIES COMPILE_FLAGS "${medpartitionercpp_DEFINITIONS}")
TARGET_LINK_LIBRARIES(medpartitioner_para medpartitionercpp ${medpartitionercpp_LDFLAGS})
- INSTALL(TARGETS medpartitioner_para DESTINATION ${MED_salomebin_BINS})
+ INSTALL(TARGETS medpartitioner_para DESTINATION ${SALOME_INSTALL_BINS})
ENDIF(MED_ENABLE_PARMETIS)
ADD_EXECUTABLE(medpartitioner medpartitioner.cxx)
SET_TARGET_PROPERTIES(medpartitioner PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS} ${medpartitionercpp_DEFINITIONS}")
TARGET_LINK_LIBRARIES(medpartitioner medpartitionercpp ${medpartitionercpp_LDFLAGS})
-INSTALL(TARGETS medpartitioner DESTINATION ${MED_salomebin_BINS})
+INSTALL(TARGETS medpartitioner DESTINATION ${SALOME_INSTALL_BINS})
-INSTALL(FILES ${medpartitionercpp_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${medpartitionercpp_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+ADD_DEFINITIONS(${BOOST_DEFINITIONS} ${CPPUNIT_DEFINITIONS})
+
INCLUDE_DIRECTORIES(
${PARMETIS_INCLUDE_DIRS}
${METIS_INCLUDE_DIRS}
${CPPUNIT_INCLUDE_DIRS}
${METIS_INCLUDE_DIRS}
${LIBXML_INCLUDE_DIRS}
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${MPI_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/..
MEDPARTITIONERTest.cxx
)
-SET(MEDPARTITIONERTest_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${LIBXML_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
-SET(MEDPARTITIONERTest_LDFLAGS medpartitionercpp ${CPPUNIT_LIBS})
+SET(MEDPARTITIONERTest_DEFINITIONS "")
+SET(MEDPARTITIONERTest_LDFLAGS medpartitionercpp ${CPPUNIT_LIBRARIES})
IF(MED_ENABLE_SCOTCH)
SET(MEDPARTITIONERTest_DEFINITIONS "${MEDPARTITIONERTest_DEFINITIONS} ${SCOTCH_DEFINITIONS}")
ADD_LIBRARY(MEDPARTITIONERTest SHARED ${MEDPARTITIONERTest_SOURCES})
SET_TARGET_PROPERTIES(MEDPARTITIONERTest PROPERTIES COMPILE_FLAGS "${MEDPARTITIONERTest_DEFINITIONS}")
TARGET_LINK_LIBRARIES(MEDPARTITIONERTest ${MEDPARTITIONERTest_LDFLAGS})
-INSTALL(TARGETS MEDPARTITIONERTest DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS MEDPARTITIONERTest DESTINATION ${SALOME_INSTALL_LIBS})
ADD_EXECUTABLE(TestMEDPARTITIONER TestMEDPARTITIONER.cxx)
SET_TARGET_PROPERTIES(TestMEDPARTITIONER PROPERTIES COMPILE_FLAGS "${MEDPARTITIONERTest_DEFINITIONS}")
TARGET_LINK_LIBRARIES(TestMEDPARTITIONER MEDPARTITIONERTest)
-INSTALL(TARGETS TestMEDPARTITIONER DESTINATION ${MED_salomebin_BINS})
+INSTALL(TARGETS TestMEDPARTITIONER DESTINATION ${SALOME_INSTALL_BINS})
-INSTALL(FILES ${MEDPARTITIONERTest_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${MEDPARTITIONERTest_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
ADD_TEST(TestMEDPARTITIONER TestMEDPARTITIONER)
ADD_LIBRARY(paramedcouplingcorba SHARED ${paramedcouplingcorba_SOURCES})
SET_TARGET_PROPERTIES(paramedcouplingcorba PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
TARGET_LINK_LIBRARIES(paramedcouplingcorba medcouplingcorba ${MPI_LIBS})
-INSTALL(TARGETS paramedcouplingcorba DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS paramedcouplingcorba DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB paramedcouplingcorba_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${paramedcouplingcorba_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${paramedcouplingcorba_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
#
# Author : Anthony Geay (CEA/DEN)
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS})
+
INCLUDE_DIRECTORIES(
${MPI_INCLUDE_DIRS}
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../ParaMEDMEM
${CMAKE_CURRENT_SOURCE_DIR}/../MEDLoader
)
ADD_LIBRARY(paramedloader SHARED ${paramedloader_SOURCES})
-SET_TARGET_PROPERTIES(paramedloader PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS}")
TARGET_LINK_LIBRARIES(paramedloader paramedmem medloader ${PLATFORM_LIBS})
-INSTALL(TARGETS paramedloader DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS paramedloader DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB paramedloader_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${paramedloader_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${paramedloader_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
#
# Author : Anthony Geay (CEA/DEN)
+ADD_DEFINITIONS(${MPI_DEFINITIONS})
+
INCLUDE_DIRECTORIES(
${MPI_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
)
ADD_LIBRARY(paramedmem SHARED ${paramedmem_SOURCES})
-SET_TARGET_PROPERTIES(paramedmem PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(paramedmem medcoupling ${MPI_LIBS})
-INSTALL(TARGETS paramedmem DESTINATION ${MED_salomelib_LIBS})
+TARGET_LINK_LIBRARIES(paramedmem medcoupling ${MPI_LIBRARIES})
+INSTALL(TARGETS paramedmem DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB paramedmem_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${paramedmem_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${paramedmem_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
# To allow usage as SWIG dependencies:
SET(paramedmem_HEADERS_HXX PARENT_SCOPE)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+ADD_DEFINITIONS(${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS})
+
INCLUDE_DIRECTORIES(
${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
${MPI_INCLUDE_DIRS}
)
ADD_LIBRARY(paramedmemcompo SHARED ${paramedmemcompo_SOURCES})
-SET_TARGET_PROPERTIES(paramedmemcompo PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
TARGET_LINK_LIBRARIES(paramedmemcompo medcouplingcorba paramedmem)
-INSTALL(TARGETS paramedmemcompo DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS paramedmemcompo DESTINATION ${SALOME_INSTALL_LIBS})
FILE(GLOB paramedmemcompo_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
-INSTALL(FILES ${paramedmemcompo_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${paramedmemcompo_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+ADD_DEFINITIONS(${MPI_DEFINITIONS} ${CPPUNIT_DEFINITIONS})
+
INCLUDE_DIRECTORIES(
${MPI_INCLUDE_DIRS}
${CPPUNIT_INCLUDE_DIR}
)
ADD_LIBRARY(ParaMEDMEMTest SHARED ${ParaMEDMEMTest_SOURCES})
-SET_TARGET_PROPERTIES(ParaMEDMEMTest PROPERTIES COMPILE_FLAGS "${MPI_DEFINITIONS} ${CPPUNIT_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(ParaMEDMEMTest paramedmem paramedloader ${CPPUNIT_LIBS})
-INSTALL(TARGETS ParaMEDMEMTest DESTINATION ${MED_salomelib_LIBS})
+SET_TARGET_PROPERTIES(ParaMEDMEMTest PROPERTIES COMPILE_FLAGS "")
+TARGET_LINK_LIBRARIES(ParaMEDMEMTest paramedmem paramedloader ${CPPUNIT_LIBRARIES})
+INSTALL(TARGETS ParaMEDMEMTest DESTINATION ${SALOME_INSTALL_LIBS})
SET(TESTSParaMEDMEM)
SET(TestParaMEDMEM_SOURCES
FOREACH(bintestparamem ${TESTSParaMEDMEM})
ADD_EXECUTABLE(${bintestparamem} ${${bintestparamem}_SOURCES})
- SET_TARGET_PROPERTIES(${bintestparamem} PROPERTIES COMPILE_FLAGS "${MPI_FLGAS} ${CPPUNIT_DEFINITIONS}")
TARGET_LINK_LIBRARIES(${bintestparamem} ParaMEDMEMTest)
ENDFOREACH(bintestparamem ${TESTSParaMEDMEM})
-INSTALL(TARGETS ${TESTSParaMEDMEM} DESTINATION ${MED_salomebin_BINS})
+INSTALL(TARGETS ${TESTSParaMEDMEM} DESTINATION ${SALOME_INSTALL_BINS})
SET(COMMON_HEADERS_HXX
MPIMainTest.hxx
MPIAccessDECTest.hxx
ParaMEDMEMTest.hxx
MPI2Connector.hxx
)
-INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
\ No newline at end of file
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
+ADD_DEFINITIONS(${PLATFORM_DEFINITIONS} ${PYTHON_DEFINITIONS})
+
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${MPI_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}
IF(NUMPY_STATUS)
SET(SWIG_MODULE_ParaMEDMEM_EXTRA_FLAGS -DWITH_NUMPY)
ENDIF(NUMPY_STATUS)
-SET_TARGET_PROPERTIES(${SWIG_MODULE_ParaMEDMEM_REAL_NAME} PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS} ${PYTHON_DEFINITIONS}")
-INSTALL(TARGETS _ParaMEDMEM DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ParaMEDMEM.i DESTINATION ${MED_salomeinclude_HEADERS})
-INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py test_InterpKernelDEC.py test_NonCoincidentDEC.py test_StructuredCoincidentDEC.py DESTINATION ${MED_salomescript_PYTHON})
\ No newline at end of file
+INSTALL(TARGETS _ParaMEDMEM DESTINATION ${SALOME_INSTALL_PYTHON})
+INSTALL(FILES ParaMEDMEM.i DESTINATION ${SALOME_INSTALL_HEADERS})
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py ${SALOME_INSTALL_SCRIPT_PYTHON})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py test_InterpKernelDEC.py test_NonCoincidentDEC.py test_StructuredCoincidentDEC.py DESTINATION ${SALOME_INSTALL_SCRIPT_PYTHON})
\ No newline at end of file
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${PLATFORM_DEFINITIONS})
+
INCLUDE_DIRECTORIES(
${BOOST_INCLUDE_DIRS}
${METIS_INCLUDE_DIRS}
- ${MED3_INCLUDE_DIRS}
+ ${MEDFILE_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/../MEDLoader
${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling
)
SET(renumbercpp_LDFLAGS medloader)
-SET(renumber_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
IF(MED_ENABLE_METIS)
SET(renumbercpp_SOURCES ${renumbercpp_SOURCES} RENUMBER_METISRenumbering.cxx)
ADD_EXECUTABLE(renumber ${renumber_SOURCES})
SET_TARGET_PROPERTIES(renumber PROPERTIES COMPILE_FLAGS "${renumber_DEFINITIONS}")
TARGET_LINK_LIBRARIES(renumber renumbercpp)
-INSTALL(TARGETS renumber DESTINATION ${MED_salomebin_BINS})
+INSTALL(TARGETS renumber DESTINATION ${SALOME_INSTALL_BINS})
ADD_LIBRARY(renumbercpp SHARED ${renumbercpp_SOURCES})
SET_TARGET_PROPERTIES(renumbercpp PROPERTIES COMPILE_FLAGS "${renumber_DEFINITIONS}")
TARGET_LINK_LIBRARIES(renumbercpp ${renumbercpp_LDFLAGS})
-INSTALL(TARGETS renumbercpp DESTINATION ${MED_salomelib_LIBS})
+INSTALL(TARGETS renumbercpp DESTINATION ${SALOME_INSTALL_LIBS})
-INSTALL(FILES ${renumbercpp_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${renumbercpp_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})