-
Notifications
You must be signed in to change notification settings - Fork 1
/
mpixharmonize-config.cmake.in
29 lines (23 loc) · 1.21 KB
/
mpixharmonize-config.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Required for check_language
include(CheckLanguage)
set(MPITS_CONFIG "@MPITS_CONFIG@")
@PACKAGE_INIT@
set_and_check(MPIX_HARMONIZE_DIR "${PACKAGE_PREFIX_DIR}")
set_and_check(MPIX_HARMONIZE_INCLUDE_DIRS "@PACKAGE_MPIX_HARMONIZE_INSTALL_INCLUDEDIR@")
set_and_check(MPIX_HARMONIZE_CMAKE_DIRS "@PACKAGE_MPIX_HARMONIZE_INSTALL_CMAKEDIR@")
set_and_check(MPIX_HARMONIZE_LIBRARY_DIRS "@PACKAGE_MPIX_HARMONIZE_INSTALL_LIBDIR@")
# Pull the dependencies
list(APPEND CMAKE_PREFIX_PATH "${MPIX_HARMONIZE_CMAKE_DIRS}")
list(APPEND CMAKE_MODULE_PATH "${MPIX_HARMONIZE_CMAKE_DIRS}")
# pull in mpits
if (NOT TARGET MPITS::mpits AND MPITS_CONFIG)
get_filename_component(MPITS_CONFIG_DIR "${MPITS_CONFIG}" DIRECTORY)
find_package(MPITS CONFIG QUIET REQUIRED COMPONENTS mpits PATHS "${MPITS_CONFIG_DIR}" NO_DEFAULT_PATH)
endif (NOT TARGET MPITS::mpits AND MPITS_CONFIG)
# Pull the MPIXHarmonize::<targets>
if(NOT TARGET MPIXHarmonize::mpix-harmonize)
include(${CMAKE_CURRENT_LIST_DIR}/MPIXHarmonizeTargets.cmake)
if (NOT TARGET MPIXHarmonize::mpix-harmonize)
message(FATAL_ERROR "expected MPIXHarmonize among imported targets")
endif (NOT TARGET MPIXHarmonize::mpix-harmonize)
endif(NOT TARGET MPIXHarmonize::mpix-harmonize)