From e9bb390cda9793fa2a18c614cc8c4932c8d461ab Mon Sep 17 00:00:00 2001 From: ageay Date: Fri, 5 Jul 2013 14:33:44 +0000 Subject: [PATCH] New CMake implementation --- CMakeLists.txt | 405 +++++++++++------- adm_local/cmake_files/CMakeLists.txt | 2 +- adm_local_without_kernel/CMakeLists.txt | 2 +- bin/CMakeLists.txt | 2 +- idl/CMakeLists.txt | 6 +- resources/CMakeLists.txt | 4 +- src/CMakeLists.txt | 117 +++-- src/INTERP_KERNEL/CMakeLists.txt | 4 +- src/INTERP_KERNELTest/CMakeLists.txt | 17 +- src/MEDCalculator/CMakeLists.txt | 19 +- src/MEDCalculator/Swig/CMakeLists.txt | 18 +- src/MEDCalculator/Test/CMakeLists.txt | 9 +- src/MEDCoupling/CMakeLists.txt | 10 +- src/MEDCoupling/Test/CMakeLists.txt | 8 +- src/MEDCouplingCorba/CMakeLists.txt | 11 +- src/MEDCouplingCorba/Client/CMakeLists.txt | 7 +- src/MEDCouplingCorba/Test/CMakeLists.txt | 9 +- src/MEDCouplingCorba_Swig/CMakeLists.txt | 7 +- .../Client/CMakeLists.txt | 7 +- src/MEDCoupling_Swig/CMakeLists.txt | 11 +- src/MEDGUI/CMakeLists.txt | 7 +- src/MEDLoader/CMakeLists.txt | 21 +- src/MEDLoader/Swig/CMakeLists.txt | 21 +- src/MEDLoader/Test/CMakeLists.txt | 10 +- src/MEDOP/cmp/CMakeLists.txt | 20 +- src/MEDOP/exe/appligen/CMakeLists.txt | 4 +- src/MEDOP/exe/image2med/CMakeLists.txt | 2 +- src/MEDOP/gui/CMakeLists.txt | 22 +- src/MEDOP/gui/dialogs/CMakeLists.txt | 14 +- src/MEDOP/res/testfiles/CMakeLists.txt | 4 +- src/MEDOP/tui/xmedpy/CMakeLists.txt | 4 +- src/MEDPartitioner/CMakeLists.txt | 29 +- src/MEDPartitioner/Test/CMakeLists.txt | 14 +- src/ParaMEDCouplingCorba/CMakeLists.txt | 4 +- src/ParaMEDLoader/CMakeLists.txt | 9 +- src/ParaMEDMEM/CMakeLists.txt | 9 +- src/ParaMEDMEMComponent/CMakeLists.txt | 7 +- src/ParaMEDMEMTest/CMakeLists.txt | 13 +- src/ParaMEDMEM_Swig/CMakeLists.txt | 14 +- src/RENUMBER/CMakeLists.txt | 11 +- 40 files changed, 501 insertions(+), 413 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3030b4f0d..8dcfa5c6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,166 +17,271 @@ # 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) diff --git a/adm_local/cmake_files/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt index 29afb97fe..b0b83f94a 100644 --- a/adm_local/cmake_files/CMakeLists.txt +++ b/adm_local/cmake_files/CMakeLists.txt @@ -27,4 +27,4 @@ SET(admlocal_cmake_DATA FindSPLITTER.cmake ) -INSTALL(FILES ${admlocal_cmake_DATA} DESTINATION ${MED_admlocalcmake}) +INSTALL(FILES ${admlocal_cmake_DATA} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL}) diff --git a/adm_local_without_kernel/CMakeLists.txt b/adm_local_without_kernel/CMakeLists.txt index 86c99f919..7bc70f334 100755 --- a/adm_local_without_kernel/CMakeLists.txt +++ b/adm_local_without_kernel/CMakeLists.txt @@ -21,4 +21,4 @@ SET(input ${CMAKE_CURRENT_SOURCE_DIR}/SALOMEconfig.h.in) 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}) diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt index 1da1574f7..a90e82b5c 100644 --- a/bin/CMakeLists.txt +++ b/bin/CMakeLists.txt @@ -19,4 +19,4 @@ 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}) diff --git a/idl/CMakeLists.txt b/idl/CMakeLists.txt index 3e328f4f1..37ee6a2f1 100644 --- a/idl/CMakeLists.txt +++ b/idl/CMakeLists.txt @@ -36,9 +36,9 @@ SET(SalomeIDLMED_IDLSOURCES 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 @@ -64,4 +64,4 @@ OMNIORB_ADD_MODULE(SalomeIDLMEDTests "${SalomeIDLMEDTests_IDLSOURCES}" "${IDL_IN 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}) diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index df326a56f..154150289 100644 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -225,11 +225,11 @@ IF(MED_ENABLE_GUI) ) 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}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a883b9bbc..c85e3a3b9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,77 +17,56 @@ # 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) diff --git a/src/INTERP_KERNEL/CMakeLists.txt b/src/INTERP_KERNEL/CMakeLists.txt index e9f05fe0d..0c29d1e3b 100644 --- a/src/INTERP_KERNEL/CMakeLists.txt +++ b/src/INTERP_KERNEL/CMakeLists.txt @@ -74,11 +74,11 @@ ENDIF(NOT WIN32) 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) diff --git a/src/INTERP_KERNELTest/CMakeLists.txt b/src/INTERP_KERNELTest/CMakeLists.txt index f843aa0e1..160ba2ccb 100644 --- a/src/INTERP_KERNELTest/CMakeLists.txt +++ b/src/INTERP_KERNELTest/CMakeLists.txt @@ -18,10 +18,12 @@ # # 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 @@ -68,19 +70,16 @@ IF(NOT MED_ENABLE_MICROMED) 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}) diff --git a/src/MEDCalculator/CMakeLists.txt b/src/MEDCalculator/CMakeLists.txt index 684004237..de7d05497 100644 --- a/src/MEDCalculator/CMakeLists.txt +++ b/src/MEDCalculator/CMakeLists.txt @@ -18,14 +18,18 @@ # # 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} @@ -52,11 +56,10 @@ SET(medcalculator_SOURCES ) 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}) diff --git a/src/MEDCalculator/Swig/CMakeLists.txt b/src/MEDCalculator/Swig/CMakeLists.txt index 167b2b238..3634a39e0 100644 --- a/src/MEDCalculator/Swig/CMakeLists.txt +++ b/src/MEDCalculator/Swig/CMakeLists.txt @@ -18,13 +18,14 @@ # # 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}/.. @@ -42,8 +43,8 @@ SET(medcalculatorspython_SOURCES ) 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") @@ -52,14 +53,13 @@ IF(NUMPY_STATUS) 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}) diff --git a/src/MEDCalculator/Test/CMakeLists.txt b/src/MEDCalculator/Test/CMakeLists.txt index 6835a1696..8911ae7aa 100644 --- a/src/MEDCalculator/Test/CMakeLists.txt +++ b/src/MEDCalculator/Test/CMakeLists.txt @@ -18,11 +18,13 @@ # # 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 @@ -38,8 +40,7 @@ SET(TestMEDCalculator_SOURCES ) 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}) diff --git a/src/MEDCoupling/CMakeLists.txt b/src/MEDCoupling/CMakeLists.txt index a7a715a8e..0e99eb836 100644 --- a/src/MEDCoupling/CMakeLists.txt +++ b/src/MEDCoupling/CMakeLists.txt @@ -18,9 +18,9 @@ # # 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}/../.. @@ -64,16 +64,16 @@ SET(medcouplingremapper_SOURCES 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) diff --git a/src/MEDCoupling/Test/CMakeLists.txt b/src/MEDCoupling/Test/CMakeLists.txt index 30d0d4197..d504e89e2 100644 --- a/src/MEDCoupling/Test/CMakeLists.txt +++ b/src/MEDCoupling/Test/CMakeLists.txt @@ -54,17 +54,17 @@ SET(TestMEDCouplingExamples_SOURCES 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}) diff --git a/src/MEDCouplingCorba/CMakeLists.txt b/src/MEDCouplingCorba/CMakeLists.txt index bbe017c60..b62e5896a 100644 --- a/src/MEDCouplingCorba/CMakeLists.txt +++ b/src/MEDCouplingCorba/CMakeLists.txt @@ -18,11 +18,13 @@ # # 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} @@ -53,12 +55,11 @@ SET(medcouplingcorba_SOURCES ) 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) diff --git a/src/MEDCouplingCorba/Client/CMakeLists.txt b/src/MEDCouplingCorba/Client/CMakeLists.txt index a7aaef2bf..046ba8c51 100644 --- a/src/MEDCouplingCorba/Client/CMakeLists.txt +++ b/src/MEDCouplingCorba/Client/CMakeLists.txt @@ -42,9 +42,8 @@ SET(medcouplingclient_SOURCES ) 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}) diff --git a/src/MEDCouplingCorba/Test/CMakeLists.txt b/src/MEDCouplingCorba/Test/CMakeLists.txt index 14daa962e..8e1639034 100644 --- a/src/MEDCouplingCorba/Test/CMakeLists.txt +++ b/src/MEDCouplingCorba/Test/CMakeLists.txt @@ -38,8 +38,7 @@ SET(TestMEDCouplingCorbaServ_SOURCES ) 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 @@ -48,7 +47,7 @@ SET(TestMEDCouplingCorbaClt_SOURCES ) 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}) diff --git a/src/MEDCouplingCorba_Swig/CMakeLists.txt b/src/MEDCouplingCorba_Swig/CMakeLists.txt index bdbb36fc5..0af175e64 100644 --- a/src/MEDCouplingCorba_Swig/CMakeLists.txt +++ b/src/MEDCouplingCorba_Swig/CMakeLists.txt @@ -20,7 +20,6 @@ ADD_SUBDIRECTORY(Client) -INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake) FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) @@ -59,7 +58,7 @@ IF(WIN32) 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}) diff --git a/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt b/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt index 09a25576f..5478b30e3 100644 --- a/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt +++ b/src/MEDCouplingCorba_Swig/Client/CMakeLists.txt @@ -18,7 +18,6 @@ # # Author : Anthony Geay (CEA/DEN) -INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake) FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) @@ -48,7 +47,7 @@ IF(WIN32) 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}) diff --git a/src/MEDCoupling_Swig/CMakeLists.txt b/src/MEDCoupling_Swig/CMakeLists.txt index 7768734d1..8e3e4a74d 100644 --- a/src/MEDCoupling_Swig/CMakeLists.txt +++ b/src/MEDCoupling_Swig/CMakeLists.txt @@ -17,9 +17,6 @@ # 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) @@ -76,13 +73,13 @@ IF(WIN32) 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) diff --git a/src/MEDGUI/CMakeLists.txt b/src/MEDGUI/CMakeLists.txt index 6910694f5..5f77106cf 100644 --- a/src/MEDGUI/CMakeLists.txt +++ b/src/MEDGUI/CMakeLists.txt @@ -17,6 +17,8 @@ # 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) @@ -59,7 +61,6 @@ SET(MEDGUITS_SOURCES ) 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}") diff --git a/src/MEDLoader/CMakeLists.txt b/src/MEDLoader/CMakeLists.txt index 43f3ea161..261e5d01c 100644 --- a/src/MEDLoader/CMakeLists.txt +++ b/src/MEDLoader/CMakeLists.txt @@ -18,13 +18,18 @@ # # 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 @@ -52,12 +57,12 @@ SET(medloader_SOURCES ) 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) diff --git a/src/MEDLoader/Swig/CMakeLists.txt b/src/MEDLoader/Swig/CMakeLists.txt index 41f354a7c..fa0450b1f 100644 --- a/src/MEDLoader/Swig/CMakeLists.txt +++ b/src/MEDLoader/Swig/CMakeLists.txt @@ -18,8 +18,6 @@ # # Author : Anthony Geay (CEA/DEN) -INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake) - FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) @@ -35,7 +33,7 @@ SET (MEDLoader_SWIG_DPYS_FILES INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} - ${MED3_INCLUDE_DIRS} + ${MEDFILE_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/.. @@ -55,22 +53,21 @@ SET (SWIG_MODULE_MEDLoader_EXTRA_DEPS ${MEDLoader_SWIG_DPYS_FILES} 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) diff --git a/src/MEDLoader/Test/CMakeLists.txt b/src/MEDLoader/Test/CMakeLists.txt index 6ee73c631..ccc78ea8b 100644 --- a/src/MEDLoader/Test/CMakeLists.txt +++ b/src/MEDLoader/Test/CMakeLists.txt @@ -21,7 +21,7 @@ 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 @@ -40,14 +40,12 @@ SET(TestSauvLoader_SOURCES ) 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}) diff --git a/src/MEDOP/cmp/CMakeLists.txt b/src/MEDOP/cmp/CMakeLists.txt index 34e60d102..1f2675dce 100644 --- a/src/MEDOP/cmp/CMakeLists.txt +++ b/src/MEDOP/cmp/CMakeLists.txt @@ -17,9 +17,11 @@ # 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 @@ -50,12 +52,12 @@ SET(COMMON_LIBS ${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") @@ -65,9 +67,9 @@ ADD_LIBRARY(MEDOPFactoryEngine SHARED ${MEDOPFactoryEngine_SOURCES}) 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) diff --git a/src/MEDOP/exe/appligen/CMakeLists.txt b/src/MEDOP/exe/appligen/CMakeLists.txt index 772ee3eaf..e64b93240 100644 --- a/src/MEDOP/exe/appligen/CMakeLists.txt +++ b/src/MEDOP/exe/appligen/CMakeLists.txt @@ -28,7 +28,7 @@ SET(MED_RESOURCES_FILES 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) @@ -36,4 +36,4 @@ SET(MED_RESOURCES_FILES2 ${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) diff --git a/src/MEDOP/exe/image2med/CMakeLists.txt b/src/MEDOP/exe/image2med/CMakeLists.txt index 9a787f4a8..49d948034 100644 --- a/src/MEDOP/exe/image2med/CMakeLists.txt +++ b/src/MEDOP/exe/image2med/CMakeLists.txt @@ -22,4 +22,4 @@ SET(MED_PYTHON_SCRIPTS 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) diff --git a/src/MEDOP/gui/CMakeLists.txt b/src/MEDOP/gui/CMakeLists.txt index 7ad04d92b..4b812d489 100644 --- a/src/MEDOP/gui/CMakeLists.txt +++ b/src/MEDOP/gui/CMakeLists.txt @@ -17,6 +17,8 @@ # 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) @@ -60,13 +62,13 @@ SET(MEDOPGUITS_SOURCES 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 @@ -85,18 +87,14 @@ SET(COMMON_FLAGS ${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}) diff --git a/src/MEDOP/gui/dialogs/CMakeLists.txt b/src/MEDOP/gui/dialogs/CMakeLists.txt index 2dda0a4e5..9d0d1fd54 100644 --- a/src/MEDOP/gui/dialogs/CMakeLists.txt +++ b/src/MEDOP/gui/dialogs/CMakeLists.txt @@ -17,6 +17,8 @@ # 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 ) @@ -72,11 +74,10 @@ SET(MEDOPGUI_dialogs_SOURCES ) 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}) # # --------------------------------------------------------- @@ -84,11 +85,10 @@ INSTALL(TARGETS MEDOPGUI_dialogs DESTINATION ${MED_salomelib_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}) diff --git a/src/MEDOP/res/testfiles/CMakeLists.txt b/src/MEDOP/res/testfiles/CMakeLists.txt index 9e477d738..a773710d3 100644 --- a/src/MEDOP/res/testfiles/CMakeLists.txt +++ b/src/MEDOP/res/testfiles/CMakeLists.txt @@ -32,7 +32,7 @@ SET(MED_FILES 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 @@ -42,4 +42,4 @@ SET(MED_IMG_FILES 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) diff --git a/src/MEDOP/tui/xmedpy/CMakeLists.txt b/src/MEDOP/tui/xmedpy/CMakeLists.txt index 0b15f29be..55c85452f 100644 --- a/src/MEDOP/tui/xmedpy/CMakeLists.txt +++ b/src/MEDOP/tui/xmedpy/CMakeLists.txt @@ -17,8 +17,6 @@ # 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 @@ -42,4 +40,4 @@ SET(TEST_SCRIPTS_XMED 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 diff --git a/src/MEDPartitioner/CMakeLists.txt b/src/MEDPartitioner/CMakeLists.txt index 8ad536d1a..d70a5dcd6 100644 --- a/src/MEDPartitioner/CMakeLists.txt +++ b/src/MEDPartitioner/CMakeLists.txt @@ -17,9 +17,11 @@ # 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} @@ -27,7 +29,7 @@ INCLUDE_DIRECTORIES( ${SCOTCH_INCLUDE_DIRS} ${METIS_INCLUDE_DIRS} ${LIBXML_INCLUDE_DIRS} - ${MED3_INCLUDE_DIRS} + ${MEDFILE_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS} ${MPI_INCLUDE_DIRS} ${PTHREADS_INCLUDE_DIRS} @@ -72,13 +74,12 @@ SET(medpartitionercpp_SOURCES 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 @@ -102,28 +103,28 @@ IF(MED_ENABLE_SCOTCH) 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}) diff --git a/src/MEDPartitioner/Test/CMakeLists.txt b/src/MEDPartitioner/Test/CMakeLists.txt index 4f6a7e8c4..b443a826c 100644 --- a/src/MEDPartitioner/Test/CMakeLists.txt +++ b/src/MEDPartitioner/Test/CMakeLists.txt @@ -17,6 +17,8 @@ # 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} @@ -24,7 +26,7 @@ INCLUDE_DIRECTORIES( ${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}/.. @@ -46,8 +48,8 @@ SET(MEDPARTITIONERTest_SOURCES 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}") @@ -67,13 +69,13 @@ ENDIF(MED_ENABLE_METIS) 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) diff --git a/src/ParaMEDCouplingCorba/CMakeLists.txt b/src/ParaMEDCouplingCorba/CMakeLists.txt index 3e689d061..4d3871538 100644 --- a/src/ParaMEDCouplingCorba/CMakeLists.txt +++ b/src/ParaMEDCouplingCorba/CMakeLists.txt @@ -36,7 +36,7 @@ SET(paramedcouplingcorba_SOURCES 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}) diff --git a/src/ParaMEDLoader/CMakeLists.txt b/src/ParaMEDLoader/CMakeLists.txt index 2ebc59a73..11f659034 100644 --- a/src/ParaMEDLoader/CMakeLists.txt +++ b/src/ParaMEDLoader/CMakeLists.txt @@ -18,9 +18,11 @@ # # 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 @@ -35,9 +37,8 @@ SET(paramedloader_SOURCES ) 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}) diff --git a/src/ParaMEDMEM/CMakeLists.txt b/src/ParaMEDMEM/CMakeLists.txt index 5e24a8f84..6c573f798 100644 --- a/src/ParaMEDMEM/CMakeLists.txt +++ b/src/ParaMEDMEM/CMakeLists.txt @@ -18,6 +18,8 @@ # # Author : Anthony Geay (CEA/DEN) +ADD_DEFINITIONS(${MPI_DEFINITIONS}) + INCLUDE_DIRECTORIES( ${MPI_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} @@ -60,12 +62,11 @@ SET(paramedmem_SOURCES ) 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) diff --git a/src/ParaMEDMEMComponent/CMakeLists.txt b/src/ParaMEDMEMComponent/CMakeLists.txt index ce7f5f1de..914810cd7 100644 --- a/src/ParaMEDMEMComponent/CMakeLists.txt +++ b/src/ParaMEDMEMComponent/CMakeLists.txt @@ -17,6 +17,8 @@ # 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} @@ -36,9 +38,8 @@ SET(paramedmemcompo_SOURCES ) 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}) diff --git a/src/ParaMEDMEMTest/CMakeLists.txt b/src/ParaMEDMEMTest/CMakeLists.txt index 9b8f627a3..8234d6fea 100644 --- a/src/ParaMEDMEMTest/CMakeLists.txt +++ b/src/ParaMEDMEMTest/CMakeLists.txt @@ -17,6 +17,8 @@ # 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} @@ -65,9 +67,9 @@ SET(ParaMEDMEMTest_SOURCES ) 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 @@ -106,11 +108,10 @@ ENDIF(MPI2_IS_OK) 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 @@ -118,6 +119,6 @@ SET(COMMON_HEADERS_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 diff --git a/src/ParaMEDMEM_Swig/CMakeLists.txt b/src/ParaMEDMEM_Swig/CMakeLists.txt index 5cacdcb4f..97f7ed931 100644 --- a/src/ParaMEDMEM_Swig/CMakeLists.txt +++ b/src/ParaMEDMEM_Swig/CMakeLists.txt @@ -17,7 +17,8 @@ # 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}) @@ -32,7 +33,7 @@ SET (ParaMEDMEM_SWIG_DPYS_FILES INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} - ${MED3_INCLUDE_DIRS} + ${MEDFILE_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS} ${MPI_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} @@ -59,9 +60,8 @@ SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES SWIG_DEFINITIONS "-shadow") 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 diff --git a/src/RENUMBER/CMakeLists.txt b/src/RENUMBER/CMakeLists.txt index befd5a395..c86873558 100644 --- a/src/RENUMBER/CMakeLists.txt +++ b/src/RENUMBER/CMakeLists.txt @@ -17,10 +17,12 @@ # 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 @@ -47,7 +49,6 @@ SET(renumber_SOURCES ) 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) @@ -66,11 +67,11 @@ ENDIF(BOOST_STATUS) 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}) -- 2.39.2