|
1 | | -# |
2 | | -# To be used by projects that make use of Cmakeified hdf5-1.8 |
3 | | -# |
4 | | - |
5 | | -# |
6 | | -# Find the HDF5 includes and get all installed hdf5 library settings from |
7 | | -# HDF5-config.cmake file : Requires a CMake compatible hdf5-1.8.5 or later |
8 | | -# for this feature to work. The following vars are set if hdf5 is found. |
9 | | -# |
10 | | -# HDF5_FOUND - True if found, otherwise all other vars are undefined |
11 | | -# HDF5_INCLUDE_DIR - The include dir for main *.h files |
12 | | -# HDF5_FORTRAN_INCLUDE_DIR - The include dir for fortran modules and headers |
13 | | -# HDF5_VERSION_STRING - full version (e.g. 1.8.5) |
14 | | -# HDF5_VERSION_MAJOR - major part of version (e.g. 1.8) |
15 | | -# HDF5_VERSION_MINOR - minor part (e.g. 5) |
16 | | -# |
17 | | -# The following boolean vars will be defined |
18 | | -# HDF5_ENABLE_PARALLEL - 1 if HDF5 parallel supported |
19 | | -# HDF5_BUILD_FORTRAN - 1 if HDF5 was compiled with fortran on |
20 | | -# HDF5_BUILD_CPP_LIB - 1 if HDF5 was compiled with cpp on |
21 | | -# HDF5_BUILD_TOOLS - 1 if HDF5 was compiled with tools on |
22 | | -# HDF5_BUILD_HL_LIB - 1 if HDF5 was compiled with high level on |
23 | | -# HDF5_BUILD_HL_CPP_LIB - 1 if HDF5 was compiled with high level and cpp on |
24 | | -# |
25 | | -# Target names that are valid (depending on enabled options) |
26 | | -# will be the following |
27 | | -# |
28 | | -# hdf5 : HDF5 C library |
29 | | -# hdf5_tools : the tools library |
30 | | -# hdf5_f90cstub : used by Fortran to C interface |
31 | | -# hdf5_fortran : Fortran HDF5 library |
32 | | -# hdf5_cpp : HDF5 cpp interface library |
33 | | -# hdf5_hl : High Level library |
34 | | -# hdf5_hl_f90cstub : used by Fortran to C interface to High Level library |
35 | | -# hdf5_hl_fortran : Fortran High Level library |
36 | | -# hdf5_hl_cpp : High Level cpp interface library |
37 | | -# |
38 | | -# To aid in finding HDF5 as part of a subproject set |
39 | | -# HDF5_ROOT_DIR_HINT to the location where hdf5-config.cmake lies |
40 | | -INCLUDE (SelectLibraryConfigurations) |
41 | | -INCLUDE (FindPackageHandleStandardArgs) |
42 | | - |
43 | | -# The HINTS option should only be used for values computed from the system. |
44 | | -SET (_HDF5_HINTS |
45 | | - $ENV{HOME}/.local |
46 | | - $ENV{HDF5_ROOT} |
47 | | - $ENV{HDF5_ROOT_DIR_HINT} |
48 | | -) |
49 | | -# Hard-coded guesses should still go in PATHS. This ensures that the user |
50 | | -# environment can always override hard guesses. |
51 | | -SET (_HDF5_PATHS |
52 | | - $ENV{HOME}/.local |
53 | | - $ENV{HDF5_ROOT} |
54 | | - ${HDF5_ROOT} |
55 | | - $ENV{HDF5_ROOT_DIR_HINT} |
56 | | - /usr/lib/hdf5 |
57 | | - /usr/share/hdf5 |
58 | | - /usr/local/hdf5 |
59 | | - /usr/local/hdf5/share |
60 | | -) |
61 | | -FIND_PATH (HDF5_ROOT_DIR "hdf5-config.cmake" |
62 | | - HINTS ${_HDF5_HINTS} |
63 | | - PATHS ${_HDF5_PATHS} |
64 | | - PATH_SUFFIXES |
65 | | - lib/cmake/hdf5 |
66 | | - share/cmake/hdf5 |
67 | | -) |
68 | | - |
69 | | -FIND_PATH (HDF5_INCLUDE_DIRS "H5public.h" |
70 | | - HINTS ${_HDF5_HINTS} |
71 | | - PATHS ${_HDF5_PATHS} |
72 | | - PATH_SUFFIXES |
73 | | - include |
74 | | - Include |
75 | | -) |
76 | | - |
77 | | -# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of |
78 | | -# HDF5_INCLUDE_DIRS |
79 | | -SET ( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" ) |
80 | | - |
81 | | -IF (HDF5_INCLUDE_DIR) |
82 | | - SET (HDF5_FOUND "YES") |
83 | | - INCLUDE (${HDF5_ROOT_DIR}/hdf5-config.cmake) |
84 | | -ENDIF (HDF5_INCLUDE_DIR) |
85 | | - |
| 1 | +# |
| 2 | +# To be used by projects that make use of Cmakeified hdf5-1.8 |
| 3 | +# |
| 4 | + |
| 5 | +# |
| 6 | +# Find the HDF5 includes and get all installed hdf5 library settings from |
| 7 | +# HDF5-config.cmake file : Requires a CMake compatible hdf5-1.8.5 or later |
| 8 | +# for this feature to work. The following vars are set if hdf5 is found. |
| 9 | +# |
| 10 | +# HDF5_FOUND - True if found, otherwise all other vars are undefined |
| 11 | +# HDF5_INCLUDE_DIR - The include dir for main *.h files |
| 12 | +# HDF5_FORTRAN_INCLUDE_DIR - The include dir for fortran modules and headers |
| 13 | +# HDF5_VERSION_STRING - full version (e.g. 1.8.5) |
| 14 | +# HDF5_VERSION_MAJOR - major part of version (e.g. 1.8) |
| 15 | +# HDF5_VERSION_MINOR - minor part (e.g. 5) |
| 16 | +# |
| 17 | +# The following boolean vars will be defined |
| 18 | +# HDF5_ENABLE_PARALLEL - 1 if HDF5 parallel supported |
| 19 | +# HDF5_BUILD_FORTRAN - 1 if HDF5 was compiled with fortran on |
| 20 | +# HDF5_BUILD_CPP_LIB - 1 if HDF5 was compiled with cpp on |
| 21 | +# HDF5_BUILD_TOOLS - 1 if HDF5 was compiled with tools on |
| 22 | +# HDF5_BUILD_HL_LIB - 1 if HDF5 was compiled with high level on |
| 23 | +# HDF5_BUILD_HL_CPP_LIB - 1 if HDF5 was compiled with high level and cpp on |
| 24 | +# |
| 25 | +# Target names that are valid (depending on enabled options) |
| 26 | +# will be the following |
| 27 | +# |
| 28 | +# hdf5 : HDF5 C library |
| 29 | +# hdf5_tools : the tools library |
| 30 | +# hdf5_f90cstub : used by Fortran to C interface |
| 31 | +# hdf5_fortran : Fortran HDF5 library |
| 32 | +# hdf5_cpp : HDF5 cpp interface library |
| 33 | +# hdf5_hl : High Level library |
| 34 | +# hdf5_hl_f90cstub : used by Fortran to C interface to High Level library |
| 35 | +# hdf5_hl_fortran : Fortran High Level library |
| 36 | +# hdf5_hl_cpp : High Level cpp interface library |
| 37 | +# |
| 38 | +# To aid in finding HDF5 as part of a subproject set |
| 39 | +# HDF5_ROOT_DIR_HINT to the location where hdf5-config.cmake lies |
| 40 | +INCLUDE (SelectLibraryConfigurations) |
| 41 | +INCLUDE (FindPackageHandleStandardArgs) |
| 42 | + |
| 43 | +# The HINTS option should only be used for values computed from the system. |
| 44 | +SET (_HDF5_HINTS |
| 45 | + $ENV{HOME}/.local |
| 46 | + $ENV{HDF5_ROOT} |
| 47 | + $ENV{HDF5_ROOT_DIR_HINT} |
| 48 | +) |
| 49 | +# Hard-coded guesses should still go in PATHS. This ensures that the user |
| 50 | +# environment can always override hard guesses. |
| 51 | +SET (_HDF5_PATHS |
| 52 | + $ENV{HOME}/.local |
| 53 | + $ENV{HDF5_ROOT} |
| 54 | + ${HDF5_ROOT} |
| 55 | + $ENV{HDF5_ROOT_DIR_HINT} |
| 56 | + /usr/lib/hdf5 |
| 57 | + /usr/share/hdf5 |
| 58 | + /usr/local/hdf5 |
| 59 | + /usr/local/hdf5/share |
| 60 | +) |
| 61 | +FIND_PATH (HDF5_ROOT_DIR "hdf5-config.cmake" |
| 62 | + HINTS ${_HDF5_HINTS} |
| 63 | + PATHS ${_HDF5_PATHS} |
| 64 | + PATH_SUFFIXES |
| 65 | + lib/cmake/hdf5 |
| 66 | + share/cmake/hdf5 |
| 67 | +) |
| 68 | + |
| 69 | +FIND_PATH (HDF5_INCLUDE_DIRS "H5public.h" |
| 70 | + HINTS ${_HDF5_HINTS} |
| 71 | + PATHS ${_HDF5_PATHS} |
| 72 | + PATH_SUFFIXES |
| 73 | + include |
| 74 | + Include |
| 75 | +) |
| 76 | + |
| 77 | +# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of |
| 78 | +# HDF5_INCLUDE_DIRS |
| 79 | +SET ( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" ) |
| 80 | + |
| 81 | +IF (HDF5_INCLUDE_DIR) |
| 82 | + SET (HDF5_FOUND "YES") |
| 83 | + INCLUDE (${HDF5_ROOT_DIR}/hdf5-config.cmake) |
| 84 | +ENDIF (HDF5_INCLUDE_DIR) |
| 85 | + |
0 commit comments