CMakeLists.txt 920 Bytes
Newer Older
1
include(CMakePackageConfigHelpers)
2

3
4
# config and config-version files
set(INSTALL_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/amdis/cmake)
5

6
7
8
9
10
set(PROJECT_CONFIG_FILE ${PROJECT_BINARY_DIR}/AMDiSConfig.cmake)
configure_package_config_file(AMDiSConfig.cmake.in
  ${PROJECT_CONFIG_FILE}
  INSTALL_DESTINATION
    ${INSTALL_CONFIG_DIR}
11
)
12

13
14
15
16
17
18
19
set(PROJECT_CONFIG_VERSION_FILE ${PROJECT_BINARY_DIR}/AMDiSConfigVersion.cmake)
write_basic_package_version_file(
  ${PROJECT_CONFIG_VERSION_FILE}
  VERSION
    ${PACKAGE_VERSION}
  COMPATIBILITY
    SameMajorVersion
20
21
)

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
install(FILES
  ${PROJECT_CONFIG_VERSION_FILE}
  ${PROJECT_CONFIG_FILE}
  FindMPI.cmake
  FindMTL.cmake
  FindPETSc.cmake
  FindUMFPACK.cmake
  parse_zoltan_makefile.cmake
  target_enable_bddcml.cmake
  target_enable_boost.cmake
  target_enable_cxx11.cmake
  target_enable_hypre.cmake
  target_enable_png.cmake
  target_enable_zoltan.cmake
  DESTINATION ${INSTALL_CONFIG_DIR})