forked from openPMD/openPMD-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenPMDConfig.cmake.in
40 lines (33 loc) · 1.1 KB
/
openPMDConfig.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
30
31
32
33
34
35
36
37
38
39
40
# only add PUBLIC dependencies as well
# https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-a-package-configuration-file
include(CMakeFindDependencyMacro)
find_dependency(Boost)
set(openPMD_HAVE_MPI @openPMD_HAVE_MPI@)
if(openPMD_HAVE_MPI)
find_dependency(MPI)
endif()
set(openPMD_MPI_FOUND ${openPMD_HAVE_MPI})
set(openPMD_HAVE_HDF5 @openPMD_HAVE_HDF5@)
if(openPMD_HAVE_HDF5)
find_dependency(HDF5)
endif()
set(openPMD_HDF5_FOUND ${openPMD_HAVE_HDF5})
set(openPMD_HAVE_ADIOS1 @openPMD_HAVE_ADIOS1@)
if(openPMD_HAVE_ADIOS1)
find_dependency(ADIOS)
endif()
set(openPMD_ADIOS1_FOUND ${openPMD_HAVE_ADIOS1})
set(openPMD_HAVE_ADIOS2 @openPMD_HAVE_ADIOS2@)
if(openPMD_HAVE_ADIOS2)
find_dependency(ADIOS2)
endif()
set(openPMD_ADIOS2_FOUND ${openPMD_HAVE_ADIOS2})
include("${CMAKE_CURRENT_LIST_DIR}/openPMDTargets.cmake")
# check if components are fulfilled and set openPMD_<COMPONENT>_FOUND vars
foreach(comp ${openPMD_FIND_COMPONENTS})
if(NOT openPMD_${comp}_FOUND)
if(openPMD_FIND_REQUIRED_${comp})
set(openPMD_FOUND FALSE)
endif()
endif()
endforeach()