1 # Copyright (C) 2015-2024 CEA, EDF
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
25 PROJECT(MEDCoupling C CXX)
27 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
30 IF (${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.3)
31 cmake_policy(SET CMP0057 NEW)
32 IF (${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.13)
33 cmake_policy(SET CMP0078 OLD)
35 IF (${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.14)
36 cmake_policy(SET CMP0086 OLD)
42 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake files")
43 IF(EXISTS ${CONFIGURATION_ROOT_DIR})
44 LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
45 INCLUDE(SalomeMacros NO_POLICY_SCOPE)
47 MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
52 SALOME_SETUP_VERSION(9.12.0)
53 MESSAGE(STATUS "Building ${PROJECT_NAME_UC} ${${PROJECT_NAME_UC}_VERSION} from \"${${PROJECT_NAME_UC}_GIT_SHA1}\"")
57 INCLUDE(SalomeSetupPlatform)
59 # [ABN]: use the below for aggressive code quality check:
61 # add_definitions(-Weverything)
62 # add_definitions(-Wno-inconsistent-missing-override)
63 # add_definitions(-Wno-c++98-compat -Wno-c++98-compat-pedantic)
64 # add_definitions(-Wsign-conversion)
65 # add_definitions(-Wno-switch-enum)
67 # add_definitions(-Wno-documentation-unknown-command) # \image in Doxygen
68 # add_definitions(-Wno-gnu-statement-expression) # assert(...)
70 # add_definitions(-Wno-reserved-id-macro -Wno-padded -Wno-weak-vtables -Wdouble-promotion -Wno-comma -Wno-unused-parameter)
71 # add_definitions(-Wno-unreachable-code-break -Wno-old-style-cast -Wno-deprecated -Wno-double-promotion)
72 # add_definitions(-Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes)
73 # add_definitions(-Wno-covered-switch-default -Wno-weak-template-vtables -Wno-undefined-func-template -Wno-used-but-marked-unused)
74 # add_definitions(-Wno-unreachable-code-return -Wno-missing-noreturn -Wno-unused-member-function -Wno-header-hygiene)
75 # add_definitions(-Wno-ignored-qualifiers) # because of MED-file
76 # add_definitions(-Wno-unused-function -Wno-unused-macros)
77 # add_definitions(-Wno-missing-field-initializers)
78 # add_definitions(-Wno-shadow) # SWIG generates a lot of those ...
80 # add_definitions(-Wno-float-equal) # OUCH
86 INCLUDE(CMakeDependentOption)
87 OPTION(MEDCOUPLING_MICROMED "Build MED without MED file dependency." OFF)
88 OPTION(MEDCOUPLING_ENABLE_PYTHON "Build PYTHON bindings." ON)
89 OPTION(MEDCOUPLING_ENABLE_PARTITIONER "Build MEDPartitioner." ON)
90 OPTION(MEDCOUPLING_ENABLE_RENUMBER "Build Renumber." ON)
91 OPTION(MEDCOUPLING_WITH_FILE_EXAMPLES "Install examples of files containing meshes and fields of different formats." ON)
92 OPTION(MEDCOUPLING_USE_MPI "(Use MPI containers) - For MED this triggers the build of ParaMEDMEM." OFF)
93 OPTION(MEDCOUPLING_BUILD_TESTS "Build MEDCoupling C++ tests." ON)
94 OPTION(MEDCOUPLING_BUILD_PY_TESTS "Build MEDCoupling Python tests." ON)
95 OPTION(MEDCOUPLING_BUILD_DOC "Build MEDCoupling doc." ON)
96 OPTION(MEDCOUPLING_BUILD_STATIC "Build MEDCoupling library in static mode." OFF)
97 OPTION(MEDCOUPLING_USE_64BIT_IDS "Size of IDs to refer cells and nodes. 32 bits when OFF (default), 64 bits when ON." ON)
99 IF(${MEDCOUPLING_USE_MPI})
100 SET(USE_METIS_NOT_PARMETIS OFF)
102 SET(USE_METIS_NOT_PARMETIS ON)
104 CMAKE_DEPENDENT_OPTION(MEDCOUPLING_PARTITIONER_METIS "Enable metis graph library in MEDPartitioner." ${USE_METIS_NOT_PARMETIS}
105 "MEDCOUPLING_ENABLE_PARTITIONER" OFF)
106 CMAKE_DEPENDENT_OPTION(MEDCOUPLING_PARTITIONER_SCOTCH "Enable scotch graph library in MEDPartitioner." ON
107 "MEDCOUPLING_ENABLE_PARTITIONER" OFF)
108 CMAKE_DEPENDENT_OPTION(MEDCOUPLING_PARTITIONER_PARMETIS "Enable parmetis graph library in MEDPartitioner." ON
109 "MEDCOUPLING_ENABLE_PARTITIONER;MEDCOUPLING_USE_MPI" OFF)
110 CMAKE_DEPENDENT_OPTION(MEDCOUPLING_PARTITIONER_PTSCOTCH "Enable ptscotch graph library in MEDPartitioner." ON
111 "MEDCOUPLING_ENABLE_PARTITIONER;MEDCOUPLING_USE_MPI" OFF)
112 SET(XDR_DEFAULT_OPTION ON)
114 SET(XDR_DEFAULT_OPTION OFF)
116 CMAKE_DEPENDENT_OPTION(MEDCOUPLING_MEDLOADER_USE_XDR "Enable use of XDR for SauvReader." ${XDR_DEFAULT_OPTION} "NOT MEDCOUPLING_MICROMED" OFF)
117 CMAKE_DEPENDENT_OPTION(MEDCOUPLING_BUILD_FRENCH_DOC "Generate MEDCOUPLING French documentation" OFF
118 "MEDCOUPLING_BUILD_DOC" OFF)
120 IF(MEDCOUPLING_BUILD_STATIC)
121 SET(BUILD_SHARED_LIBS 0)
122 SET(CMAKE_POSITION_INDEPENDENT_CODE 1) # -fPIC option
124 SET(BUILD_SHARED_LIBS 1)
127 IF(${MEDCOUPLING_PARTITIONER_PARMETIS} AND ${MEDCOUPLING_PARTITIONER_METIS})
128 MESSAGE(FATAL_ERROR "ParMetis and Metis are mutually exclusive! Make a choice (options MEDCOUPLING_PARTITIONER_METIS and MEDCOUPLING_PARTITIONER_PARMETIS).")
131 IF(${MEDCOUPLING_PARTITIONER_PTSCOTCH} AND ${MEDCOUPLING_PARTITIONER_SCOTCH})
132 MESSAGE(FATAL_ERROR "PTScotch and Scotch are mutually exclusive! Make a choice (options MEDCOUPLING_PARTITIONER_SCOTCH and MEDCOUPLING_PARTITIONER_PTSCOTCH).")
136 # Set list of prerequisites
137 # =========================
139 IF(NOT MEDCOUPLING_MICROMED)
140 FIND_PACKAGE(SalomeHDF5 REQUIRED)
141 FIND_PACKAGE(SalomeMEDFile REQUIRED)
143 IF(MEDCOUPLING_MEDLOADER_USE_XDR)
144 FIND_PACKAGE(SalomeXDR REQUIRED)
145 ENDIF(MEDCOUPLING_MEDLOADER_USE_XDR)
147 IF(MEDCOUPLING_ENABLE_PARTITIONER)
148 FIND_PACKAGE(SalomeLibXml2)
149 SALOME_LOG_OPTIONAL_PACKAGE(LibXml2 MEDCOUPLING_ENABLE_PARTITIONER)
150 IF(MEDCOUPLING_PARTITIONER_METIS)
151 FIND_PACKAGE(SalomeMetis)
152 SALOME_LOG_OPTIONAL_PACKAGE(Metis MEDCOUPLING_PARTITIONER_METIS)
153 IF(SalomeMetis_FOUND)
154 ADD_DEFINITIONS("-DMED_ENABLE_METIS")
156 ENDIF(MEDCOUPLING_PARTITIONER_METIS)
157 IF(MEDCOUPLING_PARTITIONER_SCOTCH)
158 FIND_PACKAGE(SalomeScotch)
159 SALOME_LOG_OPTIONAL_PACKAGE(Scotch MEDCOUPLING_PARTITIONER_SCOTCH)
160 IF(SalomeScotch_FOUND)
161 ADD_DEFINITIONS("-DMED_ENABLE_SCOTCH")
163 ENDIF(MEDCOUPLING_PARTITIONER_SCOTCH)
164 ENDIF(MEDCOUPLING_ENABLE_PARTITIONER)
165 ENDIF(NOT MEDCOUPLING_MICROMED)
167 ENABLE_TESTING() # let it outsite because even if MEDCOUPLING_BUILD_TESTS is OFF, python tests that not need additional compilation can be run.
169 IF(MEDCOUPLING_BUILD_TESTS)
170 FIND_PACKAGE(SalomeCppUnit)
171 SALOME_LOG_OPTIONAL_PACKAGE(CppUnit SALOME_BUILD_TESTS)
172 ENDIF(MEDCOUPLING_BUILD_TESTS)
174 IF(MEDCOUPLING_USE_MPI)
175 FIND_PACKAGE(SalomeMPI REQUIRED)
176 # Used when exporting configuration:
177 SET(MEDCOUPLING_CXX_COMPILER "${CMAKE_CXX_COMPILER}")
178 SET(MEDCOUPLING_MPI_CXX_COMPILER "${MPI_CXX_COMPILER}") # Might not always be set even if MPI there ...
179 SET(MEDCOUPLING_MPI_CXX_LIBRARIES "${MPI_CXX_LIBRARIES}")
181 ADD_DEFINITIONS("-DHAVE_MPI")
182 SALOME_ADD_MPI_TO_HDF5()
183 IF(MEDCOUPLING_PARTITIONER_PARMETIS)
184 FIND_PACKAGE(SalomeParMetis)
185 SALOME_LOG_OPTIONAL_PACKAGE(ParMetis MEDCOUPLING_PARTITIONER_PARMETIS)
186 IF (SalomeParMetis_FOUND)
187 ADD_DEFINITIONS("-DMED_ENABLE_PARMETIS")
189 ENDIF(MEDCOUPLING_PARTITIONER_PARMETIS)
190 IF(MEDCOUPLING_PARTITIONER_PTSCOTCH)
191 FIND_PACKAGE(SalomePTScotch)
192 SALOME_LOG_OPTIONAL_PACKAGE(PTScotch MEDCOUPLING_PARTITIONER_PTSCOTCH)
193 IF(SalomePTScotch_FOUND)
194 ADD_DEFINITIONS("-DMED_ENABLE_PTSCOTCH")
195 ENDIF(SalomePTScotch_FOUND)
196 ENDIF(MEDCOUPLING_PARTITIONER_PTSCOTCH)
197 ENDIF(MEDCOUPLING_USE_MPI)
199 IF(MEDCOUPLING_ENABLE_RENUMBER)
200 FIND_PACKAGE(SalomeBoost)
201 SALOME_LOG_OPTIONAL_PACKAGE(Boost MEDCOUPLING_ENABLE_RENUMBER)
202 ENDIF(MEDCOUPLING_ENABLE_RENUMBER)
204 IF(MEDCOUPLING_ENABLE_PYTHON)
205 FIND_PACKAGE(SalomePythonInterp)
206 FIND_PACKAGE(SalomePythonLibs)
207 FIND_PACKAGE(SalomeNumPySciPy)
208 FIND_PACKAGE(SalomeSWIG)
209 SALOME_LOG_OPTIONAL_PACKAGE(PythonInterp MEDCOUPLING_ENABLE_PYTHON)
210 SALOME_LOG_OPTIONAL_PACKAGE(PythonLibs MEDCOUPLING_ENABLE_PYTHON)
211 SALOME_LOG_OPTIONAL_PACKAGE(SWIG MEDCOUPLING_ENABLE_PYTHON)
212 IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "2")
213 IF("${PYTHON_VERSION_MINOR}" LESS "7")
214 MESSAGE(FATAL_ERROR "MEDCoupling's Python requires at least Python 2.7 (you seem to have ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}). Upgrade your Python, or turn off MEDCOUPLING_ENABLE_PYTHON")
217 IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
218 MESSAGE(STATUS "Using Python 3")
220 IF ("${SWIG_VERSION}" VERSION_GREATER_EQUAL "4")
221 SET(MEDCOUPLING_SWIG4_COMPAT TRUE CACHE BOOL "SWIG 4 compatibility (experimental)")
223 SET(MEDCOUPLING_SWIG4_COMPAT FALSE)
225 IF(MEDCOUPLING_SWIG4_COMPAT)
226 LIST(APPEND CMAKE_SWIG_FLAGS "-DMEDCOUPLING_SWIG4_COMPAT")
228 ENDIF(MEDCOUPLING_ENABLE_PYTHON)
230 IF(MEDCOUPLING_BUILD_DOC)
231 FIND_PACKAGE(SalomeDoxygen)
232 FIND_PACKAGE(SalomeGraphviz)
233 FIND_PACKAGE(SalomeSphinx)
234 SALOME_LOG_OPTIONAL_PACKAGE(Doxygen MEDCOUPLING_BUILD_DOC)
235 SALOME_LOG_OPTIONAL_PACKAGE(Graphviz MEDCOUPLING_BUILD_DOC)
236 SALOME_LOG_OPTIONAL_PACKAGE(Sphinx MEDCOUPLING_BUILD_DOC)
237 ENDIF(MEDCOUPLING_BUILD_DOC)
241 SALOME_PACKAGE_REPORT_AND_CHECK()
245 # Directories have to be given after prerequisites (to be able to use
246 # Python version string for example).
248 SET(MEDCOUPLING_INSTALL_BINS bin CACHE PATH "Install path: MEDCoupling binaries")
249 SET(MEDCOUPLING_INSTALL_LIBS lib CACHE PATH "Install path: MEDCoupling libs")
250 SET(MEDCOUPLING_INSTALL_HEADERS include CACHE PATH "Install path: MEDCoupling headers")
251 SET(MEDCOUPLING_INSTALL_SCRIPT_SCRIPTS ${MEDCOUPLING_INSTALL_BINS} CACHE PATH "Install path: MEDCoupling scripts")
252 SET(MEDCOUPLING_INSTALL_TESTS tests CACHE PATH "Install path: MEDCoupling tests")
253 # SET(MEDCOUPLING_INSTALL_SCRIPT_DATA ${MEDCOUPLING_INSTALL_BINS} CACHE PATH "Install path: MEDCoupling script data")
254 SET(MEDCOUPLING_INSTALL_SCRIPT_PYTHON ${MEDCOUPLING_INSTALL_BINS} CACHE PATH "Install path: MEDCoupling Python scripts")
255 SET(MEDCOUPLING_INSTALL_CMAKE_LOCAL cmake_files CACHE PATH "Install path: local MEDCoupling CMake files")
257 IF(MEDCOUPLING_ENABLE_PYTHON)
258 SET(_pydir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages)
259 SET(MEDCOUPLING_INSTALL_PYTHON ${_pydir} CACHE PATH "Install path: MEDCoupling Python stuff")
260 SET(MEDCOUPLING_INSTALL_PYTHON_SHARED ${MEDCOUPLING_INSTALL_PYTHON}/shared_modules CACHE PATH
261 "Install path: MEDCoupling Python shared modules")
262 ENDIF(MEDCOUPLING_ENABLE_PYTHON)
264 SET(MEDCOUPLING_INSTALL_RES share/resources CACHE PATH "Install path: MEDCoupling resources")
265 SET(MEDCOUPLING_INSTALL_DOC share/doc CACHE PATH "Install path: MEDCoupling documentation")
269 SET(MEDCOUPLING_INSTALL_RES_DATA "${MEDCOUPLING_INSTALL_RES}/med" CACHE PATH "Install path: MEDCoupling specific data")
270 #SET(MEDCOUPLING_INSTALL_RES_SCRIPTS "${MEDCOUPLING_INSTALL_RES}/med" CACHE PATH "Install path: MEDCouplng specific scripts")
272 MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_BINS MEDCOUPLING_INSTALL_LIBS MEDCOUPLING_INSTALL_IDLS MEDCOUPLING_INSTALL_HEADERS)
273 MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_SCRIPT_SCRIPTS MEDCOUPLING_INSTALL_SCRIPT_DATA MEDCOUPLING_INSTALL_SCRIPT_PYTHON)
274 MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_APPLISKEL_SCRIPTS MEDCOUPLING_INSTALL_APPLISKEL_PYTHON MEDCOUPLING_INSTALL_CMAKE MEDCOUPLING_INSTALL_CMAKE_LOCAL MEDCOUPLING_INSTALL_RES)
275 MARK_AS_ADVANCED(MEDCOUPLING_INSTALL_PYTHON MEDCOUPLING_INSTALL_PYTHON_SHARED MEDCOUPLING_INSTALL_RES_DATA MEDCOUPLING_INSTALL_DOC)
277 # Header configuration
278 # ====================
279 SALOME_CONFIGURE_FILE(MEDCoupling_version.h.in MEDCoupling_version.h INSTALL ${MEDCOUPLING_INSTALL_HEADERS})
281 # Accumulate environment variables for MED module
282 #SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_BINS}
283 # ${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_PYTHON})
284 #SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${MEDCOUPLING_INSTALL_LIBS})
290 ADD_DEFINITIONS("-D_USE_MATH_DEFINES")
293 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
295 ADD_SUBDIRECTORY(src)
296 ADD_SUBDIRECTORY(adm_local)
298 IF(MEDCOUPLING_BUILD_DOC)
299 ADD_SUBDIRECTORY(doc)
300 ENDIF(MEDCOUPLING_BUILD_DOC)
302 ADD_SUBDIRECTORY(resources)
303 IF(MEDCOUPLING_ENABLE_PYTHON)
304 ADD_SUBDIRECTORY(v8_work)
307 # Configuration export
308 # ====================
309 INCLUDE(CMakePackageConfigHelpers)
311 # List of targets in this project we want to make visible to the rest of the world.
312 # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup"
313 SET(_${PROJECT_NAME}_exposed_targets
314 interpkernel medcouplingcpp medcouplingremapper medicoco)
316 IF(NOT MEDCOUPLING_MICROMED)
317 LIST(APPEND _${PROJECT_NAME}_exposed_targets medloader)
318 IF(MEDCOUPLING_ENABLE_RENUMBER)
319 LIST(APPEND _${PROJECT_NAME}_exposed_targets renumbercpp)
321 IF(MEDCOUPLING_ENABLE_PARTITIONER)
322 LIST(APPEND _${PROJECT_NAME}_exposed_targets medpartitionercpp)
323 IF(MEDCOUPLING_BUILD_TESTS)
324 LIST(APPEND _${PROJECT_NAME}_exposed_targets MEDPARTITIONERTest)
327 IF(MEDCOUPLING_BUILD_TESTS)
328 LIST(APPEND _${PROJECT_NAME}_exposed_targets InterpKernelTest InterpKernelTestUtils)
332 IF(MEDCOUPLING_USE_MPI)
333 LIST(APPEND _${PROJECT_NAME}_exposed_targets paramedmem)
334 IF(NOT MEDCOUPLING_MICROMED)
335 LIST(APPEND _${PROJECT_NAME}_exposed_targets paramedloader)
337 IF(MEDCOUPLING_BUILD_TESTS)
338 IF(NOT MEDCOUPLING_MICROMED)
339 LIST(APPEND _${PROJECT_NAME}_exposed_targets ParaMEDMEMTest)
344 # Add all targets to the build-tree export set
346 EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets}
347 FILE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
349 # Create the configuration files:
351 # Ensure the variables are always defined for the configure (even if empty):
352 SET(MEDFILE_ROOT_DIR "${MEDFILE_ROOT_DIR}")
353 SET(MPI_ROOT_DIR "${MPI_ROOT_DIR}")
354 SET(BOOST_ROOT_DIR "${BOOST_ROOT_DIR}")
355 SET(SWIG_ROOT_DIR "${SWIG_ROOT_DIR}")
356 SET(PYTHON_ROOT_DIR "${PYTHON_ROOT_DIR}")
357 SET(CPPUNIT_ROOT_DIR "${CPPUNIT_ROOT_DIR}")
358 SET(GRAPHVIZ_ROOT_DIR "${GRAPHVIZ_ROOT_DIR}")
359 SET(DOXYGEN_ROOT_DIR "${DOXYGEN_ROOT_DIR}")
360 SET(SPHINX_ROOT_DIR "${SPHINX_ROOT_DIR}")
362 SET(METIS_ROOT_DIR "${METIS_ROOT_DIR}")
363 SET(PARMETIS_ROOT_DIR "${PARMETIS_ROOT_DIR}")
364 SET(SCOTCH_ROOT_DIR "${SCOTCH_ROOT_DIR}")
365 SET(XDR_ROOT_DIR "${XDR_ROOT_DIR}")
367 SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}")
369 # Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
370 SALOME_CONFIGURE_PREPARE(MEDFile MPI Boost Swig Python CppUnit Graphviz Doxygen Sphinx
371 Metis ParMetis Scotch XDR)
373 CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
374 ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake
375 INSTALL_DESTINATION "${MEDCOUPLING_INSTALL_CMAKE_LOCAL}"
376 PATH_VARS CONF_INCLUDE_DIRS MEDCOUPLING_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
377 MEDFILE_ROOT_DIR MPI_ROOT_DIR
378 BOOST_ROOT_DIR SWIG_ROOT_DIR PYTHON_ROOT_DIR CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR
380 METIS_ROOT_DIR PARMETIS_ROOT_DIR SCOTCH_ROOT_DIR XDR_ROOT_DIR)
382 WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
383 VERSION ${${PROJECT_NAME_UC}_VERSION}
384 COMPATIBILITY AnyNewerVersion)
386 # Install the CMake configuration files:
388 "${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake"
389 "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
390 DESTINATION "${MEDCOUPLING_INSTALL_CMAKE_LOCAL}")
392 # Install the export set for use with the install-tree
393 INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${MEDCOUPLING_INSTALL_CMAKE_LOCAL}"
394 FILE ${PROJECT_NAME}Targets.cmake)