Debian Codegraph @

cmake/ISMRMRDConfig.cmake.in

raw
1 #-----------------------------------------------------------------------------
2 #
3 # ISMRMRDConfig.cmake - ISMRMRD CMake configuration file for external projects.
4 #
5 # This file is configured by ISMRMRD and used by the UseISMRMRD.cmake module
6 # to load ISMRMRD's settings for an external project.
7
8 @PACKAGE_INIT@
9
10 get_filename_component(ISMRMRD_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
11
12 include(${ISMRMRD_CMAKE_DIR}/ISMRMRDConfigVersion.cmake)
13
14 # ISMRMRD_SCHEMA_DIR - where to find ismrmrd.xsd
15 set(ISMRMRD_SCHEMA_DIR "@CONFIG_ISMRMRD_SCHEMA_DIR@")
16 # ISMRMRD_INCLUDE_DIR - where to find ismrmrd.h, etc.
17 set(ISMRMRD_INCLUDE_DIRS "@CONFIG_ISMRMRD_TARGET_INCLUDE_DIRS@")
18 # ISMRMRD_LIBRARY_DIRS - where to search for libraries
19 set(ISMRMRD_LIBRARY_DIRS "@CONFIG_ISMRMRD_LIBRARY_DIRS@")
20 # ISMRMRD_LIBRARIES - i.e. ismrmrd
21 set(ISMRMRD_LIBRARIES ISMRMRD::ISMRMRD)
22
23 set(USE_SYSTEM_PUGIXML @USE_SYSTEM_PUGIXML@)
24
25 ## For backwards compatibility use existing variable name
26 ## Include directories can be lists, and should be plural
27 ## to conform with naming schemes in many other cmake packages
28 set(ISMRMRD_INCLUDE_DIR "@CONFIG_ISMRMRD_TARGET_INCLUDE_DIRS@")
29 set(ISMRMRD_LIB_DIR "@CONFIG_ISMRMRD_LIBRARY_DIRS@")
30
31 # ------------------------------------------------------------------------------
32
33 include(CMakeFindDependencyMacro)
34
35 list(INSERT CMAKE_MODULE_PATH 0 ${ISMRMRD_CMAKE_DIR})
36
37 if (@BUILD_STATIC@)
38 set(HDF5_USE_STATIC_LIBRARIES TRUE)
39 endif()
40
41 find_package(pugixml CONFIG)
42 if (NOT pugixml_FOUND)
43 find_dependency(pugixml)
44 endif()
45
46 if (@USE_HDF5_DATASET_SUPPORT@)
47 if(CMAKE_VERSION VERSION_LESS 3.9)
48 # CMake <= 3.8 find_dependency does not support COMPONENTS
49 find_package(HDF5 REQUIRED COMPONENTS C)
50 else()
51 find_dependency(HDF5 COMPONENTS C)
52 endif()
53 endif()
54
55 list(REMOVE_AT CMAKE_MODULE_PATH 0)
56
57 # ==============================================================================
58
59 set_and_check(ISMRMRDTargets "${ISMRMRD_CMAKE_DIR}/ISMRMRDTargets.cmake")
60 include(${ISMRMRDTargets})
61
62 # ==============================================================================