LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_files")
INCLUDE(MEDCouplingMacros)
-# Platform setup
-# ==============
-#INCLUDE(SalomeSetupPlatform)
-
#
# User options
# ============
# Set list of prerequisites
# =========================
-LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_files")
-
IF(NOT MEDCOUPLING_MED_MICROMED)
- #FIND_PACKAGE(SalomeHDF5 REQUIRED)
- #FIND_PACKAGE(SalomeMEDFile REQUIRED)
FIND_PACKAGE(HDF5 REQUIRED)
FIND_PACKAGE(MEDFile REQUIRED)
# XDR stuff
IF(NOT WIN32)
- #FIND_PACKAGE(SalomeXDR REQUIRED)
FIND_PACKAGE(XDR REQUIRED)
ELSE(NOT WIN32)
IF(MEDCOUPLING_MED_MEDLOADER_USE_XDR)
- #FIND_PACKAGE(SalomeXDR REQUIRED)
FIND_PACKAGE(XDR REQUIRED)
ENDIF(MEDCOUPLING_MED_MEDLOADER_USE_XDR)
ENDIF(NOT WIN32)
# End of XDR Stuff
IF(MEDCOUPLING_MED_ENABLE_PARTITIONER)
- #FIND_PACKAGE(SalomeLibXml2)
- #SALOME_LOG_OPTIONAL_PACKAGE(LibXml2 MEDCOUPLING_MED_ENABLE_PARTITIONER)
IF(DEFINED ENV{LIBXML2_ROOT_DIR})
SET(LIBXML2_ROOT_DIR $ENV{LIBXML2_ROOT_DIR} CACHE PATH "Path to the LibXml2.")
LIST(APPEND CMAKE_PREFIX_PATH "${LIBXML2_ROOT_DIR}")
ENDIF()
FIND_PACKAGE(LibXml2)
IF(MEDCOUPLING_MED_PARTITIONER_METIS)
- #FIND_PACKAGE(SalomeMetis)
- #SALOME_LOG_OPTIONAL_PACKAGE(Metis MEDCOUPLING_MED_PARTITIONER_METIS)
FIND_PACKAGE(Metis)
ADD_DEFINITIONS("-DMED_ENABLE_METIS")
ENDIF(MEDCOUPLING_MED_PARTITIONER_METIS)
IF(MEDCOUPLING_MED_PARTITIONER_SCOTCH)
- #FIND_PACKAGE(SalomeScotch)
- #SALOME_LOG_OPTIONAL_PACKAGE(Scotch MEDCOUPLING_MED_PARTITIONER_SCOTCH)
FIND_PACKAGE(Scotch)
ADD_DEFINITIONS("-DMED_ENABLE_SCOTCH")
ENDIF(MEDCOUPLING_MED_PARTITIONER_SCOTCH)
ENABLE_TESTING() # let it outsite because even if MEDCOUPLING_BUILD_TESTS is OFF, python tests that not need additional compilation can be run.
IF(MEDCOUPLING_BUILD_TESTS)
- #FIND_PACKAGE(SalomeCppUnit)
- #SALOME_LOG_OPTIONAL_PACKAGE(CppUnit MEDCOUPLING_BUILD_TESTS)
FIND_PACKAGE(CppUnit)
ENDIF(MEDCOUPLING_BUILD_TESTS)
IF(MEDCOUPLING_USE_MPI)
- #FIND_PACKAGE(SalomeMPI REQUIRED)
FIND_PACKAGE(MPI REQUIRED)
ADD_DEFINITIONS("-DHAVE_MPI")
SET(MPI_INCLUDE_DIRS ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH})
SET(MPI_DEFINITIONS "${MPI_CXX_COMPILE_FLAGS}")
IF(MEDCOUPLING_MED_PARTITIONER_PARMETIS)
- #FIND_PACKAGE(SalomeParMetis)
FIND_PACKAGE(ParMetis)
- #SALOME_LOG_OPTIONAL_PACKAGE(ParMetis MEDCOUPLING_MED_PARTITIONER_PARMETIS)
ADD_DEFINITIONS("-DMED_ENABLE_PARMETIS")
ENDIF(MEDCOUPLING_MED_PARTITIONER_PARMETIS)
ENDIF(MEDCOUPLING_USE_MPI)
IF(MEDCOUPLING_MED_ENABLE_RENUMBER)
- #FIND_PACKAGE(SalomeBoost)
- #SALOME_LOG_OPTIONAL_PACKAGE(Boost MEDCOUPLING_MED_ENABLE_RENUMBER)
IF(DEFINED ENV{BOOST_ROOT_DIR})
SET(BOOST_ROOT_DIR $ENV{BOOST_ROOT_DIR} CACHE PATH "Path to the Boost.")
LIST(APPEND CMAKE_PREFIX_PATH "${BOOST_ROOT_DIR}")
SET(Boost_USE_MULTITHREADED ON)
SET(Boost_USE_STATIC_RUNTIME OFF)
SET(Boost_NO_BOOST_CMAKE ON)
- #SET(SalomeBoost_FIND_COMPONENTS filesystem regex signals system thread date_time chrono)
FIND_PACKAGE(Boost)
ENDIF(MEDCOUPLING_MED_ENABLE_RENUMBER)
IF(MEDCOUPLING_BUILD_DOC)
- #FIND_PACKAGE(SalomeDoxygen)
- #FIND_PACKAGE(SalomeGraphviz)
- #FIND_PACKAGE(SalomeSphinx)
- #SALOME_LOG_OPTIONAL_PACKAGE(Doxygen MEDCOUPLING_BUILD_DOC)
- #SALOME_LOG_OPTIONAL_PACKAGE(Graphviz MEDCOUPLING_BUILD_DOC)
- #SALOME_LOG_OPTIONAL_PACKAGE(Sphinx MEDCOUPLING_BUILD_DOC)
FIND_PACKAGE(Doxygen)
- IF(DEFINED ENV{GRAPHVIZ_ROOT_DIR})
- SET(GRAPHVIZ_ROOT_DIR $ENV{GRAPHVIZ_ROOT_DIR} CACHE PATH "Path to the Graphviz.")
- LIST(APPEND CMAKE_PREFIX_PATH "${GRAPHVIZ_ROOT_DIR}")
- ENDIF()
FIND_PACKAGE(Graphviz)
FIND_PACKAGE(Sphinx)
ENDIF(MEDCOUPLING_BUILD_DOC)
IF(MEDCOUPLING_MED_ENABLE_PYTHON)
- #FIND_PACKAGE(SalomePython)
- #FIND_PACKAGE(SalomeSWIG)
- #SALOME_LOG_OPTIONAL_PACKAGE(Python MEDCOUPLING_MED_ENABLE_PYTHON)
- #SALOME_LOG_OPTIONAL_PACKAGE(SWIG MEDCOUPLING_MED_ENABLE_PYTHON)
FIND_PACKAGE(PythonInterp)
GET_FILENAME_COMPONENT(_python_dir "${PYTHON_EXECUTABLE}" PATH)
GET_FILENAME_COMPONENT(CMAKE_INCLUDE_PATH "${_python_dir}/../include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" ABSOLUTE)
ENDIF(SCIPY_FOUND)
ENDIF(MEDCOUPLING_MED_ENABLE_PYTHON)
-# Detection report
-#SALOME_PACKAGE_REPORT_AND_CHECK()
-
# Directories
#
# Directories have to be given after prerequisites (to be able to use
SET(MEDCOUPLING_INSTALL_HEADERS include CACHE PATH "Install path: MEDCoupling headers")
SET(MEDCOUPLING_INSTALL_SCRIPT_SCRIPTS ${MEDCOUPLING_INSTALL_BINS} CACHE PATH "Install path: MEDCoupling scripts")
SET(MEDCOUPLING_INSTALL_TESTS tests CACHE PATH "Install path: MEDCoupling tests")
-# SET(MEDCOUPLING_INSTALL_SCRIPT_DATA ${MEDCOUPLING_INSTALL_BINS} CACHE PATH
-# "Install path: SALOME script data")
+# SET(MEDCOUPLING_INSTALL_SCRIPT_DATA ${MEDCOUPLING_INSTALL_BINS} CACHE PATH "Install path: MEDCoupling script data")
SET(MEDCOUPLING_INSTALL_SCRIPT_PYTHON ${MEDCOUPLING_INSTALL_BINS} CACHE PATH "Install path: MEDCoupling Python scripts")
-# SET(MEDCOUPLING_INSTALL_APPLISKEL_SCRIPTS ${MEDCOUPLING_INSTALL_BINS}/appliskel CACHE PATH
-# "Install path: SALOME application skeleton - scripts")
-# SET(MEDCOUPLING_INSTALL_APPLISKEL_PYTHON ${MEDCOUPLING_INSTALL_BINS}/appliskel CACHE PATH
-# "Install path: SALOME application skeleton - Python")
-# SET(MEDCOUPLING_INSTALL_CMAKE salome_adm/cmake_files CACHE PATH "Install path: SALOME CMake files")
-# SET(MEDCOUPLING_INSTALL_CMAKE_LOCAL adm_local/cmake_files CACHE PATH
-# "Install path: local SALOME CMake files")
+SET(MEDCOUPLING_INSTALL_CMAKE_LOCAL cmake_files CACHE PATH "Install path: local MEDCoupling CMake files")
IF(MEDCOUPLING_MED_ENABLE_PYTHON)
SET(_pydir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
# Med specific:
SET(MEDCOUPLING_INSTALL_RES_DATA "${MEDCOUPLING_INSTALL_RES}/med" CACHE PATH "Install path: MEDCoupling specific data")
-#SET(MEDCOUPLING_MED_INSTALL_RES_SCRIPTS "${MEDCOUPLING_INSTALL_RES}/med" CACHE PATH "Install path: SALOME MED specific scripts")
+#SET(MEDCOUPLING_MED_INSTALL_RES_SCRIPTS "${MEDCOUPLING_INSTALL_RES}/med" CACHE PATH "Install path: MEDCouplng specific scripts")
-#MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_BINS MEDCOUPLING_INSTALL_LIBS MEDCOUPLING_INSTALL_IDLS MEDCOUPLING_INSTALL_HEADERS)
-#MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_SCRIPT_SCRIPTS MEDCOUPLING_INSTALL_SCRIPT_DATA MEDCOUPLING_INSTALL_SCRIPT_PYTHON)
-#MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_APPLISKEL_SCRIPTS MEDCOUPLING_INSTALL_APPLISKEL_PYTHON MEDCOUPLING_INSTALL_CMAKE MEDCOUPLING_INSTALL_CMAKE_LOCAL MEDCOUPLING_INSTALL_RES)
-#MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_PYTHON MEDCOUPLING_INSTALL_PYTHON_SHARED MEDCOUPLING_MED_INSTALL_RES_DATA MEDCOUPLING_MED_INSTALL_RES_SCRIPTS MEDCOUPLING_INSTALL_DOC)
+MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_BINS MEDCOUPLING_INSTALL_LIBS MEDCOUPLING_INSTALL_IDLS MEDCOUPLING_INSTALL_HEADERS)
+MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_SCRIPT_SCRIPTS MEDCOUPLING_INSTALL_SCRIPT_DATA MEDCOUPLING_INSTALL_SCRIPT_PYTHON)
+MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_APPLISKEL_SCRIPTS MEDCOUPLING_INSTALL_APPLISKEL_PYTHON MEDCOUPLING_INSTALL_CMAKE MEDCOUPLING_INSTALL_CMAKE_LOCAL MEDCOUPLING_INSTALL_RES)
+MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_PYTHON MEDCOUPLING_INSTALL_PYTHON_SHARED MEDCOUPLING_MED_INSTALL_RES_DATA MEDCOUPLING_MED_INSTALL_RES_SCRIPTS MEDCOUPLING_INSTALL_DOC)
# Header configuration
# ====================
MEDCOUPLING_XVERSION(${PROJECT_NAME})
-#SALOME_CONFIGURE_FILE(MED_version.h.in MED_version.h INSTALL ${MEDCOUPLING_INSTALL_HEADERS})
-#SALOME_CONFIGURE_FILE(VERSION.in VERSION INSTALL ${MEDCOUPLING_INSTALL_BINS})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/MEDCoupling_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/MEDCoupling_version.h)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDCoupling_version.h DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
ADD_DEFINITIONS("-D_USE_MATH_DEFINES")
ENDIF(WIN32)
-#ADD_DEFINITIONS("-DMEDCOUPLING_ROOT_DIR=${CMAKE_INSTALL_PREFIX}")
ADD_SUBDIRECTORY(src)
-#ADD_SUBDIRECTORY(adm_local)
+ADD_SUBDIRECTORY(cmake_files)
IF(MEDCOUPLING_BUILD_DOC)
ADD_SUBDIRECTORY(doc)
ENDIF(MEDCOUPLING_BUILD_DOC)
-#ADD_SUBDIRECTORY(adm_local_without_kernel)
-
IF(NOT MEDCOUPLING_MED_MICROMED)
IF(MEDCOUPLING_MED_WITH_FILE_EXAMPLES)
ADD_SUBDIRECTORY(resources)