File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ NAMES H5pubconf.h H5pubconf-64.h
118
118
HINTS ${HDF5_C_INCLUDE_DIR}
119
119
NO_DEFAULT_PATH
120
120
)
121
+ message (VERBOSE "HDF5 config: ${h5_conf} " )
121
122
122
123
if (NOT h5_conf )
123
124
set (HDF5_C_FOUND false )
@@ -145,23 +146,19 @@ endif()
145
146
# get version
146
147
# from CMake/Modules/FindHDF5.cmake
147
148
file (STRINGS ${h5_conf} _def
148
- REGEX "^[ \t ]*#[ \t ]*define[ \t ]+H5_VERSION[ \t ]+" )
149
- if ("${_def} " MATCHES
150
- "H5_VERSION[ \t ]+\" ([0-9]+\\ .[0-9]+\\ .[0-9]+)(-patch([0-9]+))?\" " )
151
- set (HDF5_VERSION "${CMAKE_MATCH_1} " )
152
- if (CMAKE_MATCH_3 )
153
- set (HDF5_VERSION ${HDF5_VERSION} .${CMAKE_MATCH_3} )
154
- endif ()
149
+ REGEX "^[ \t ]*#[ \t ]*define[ \t ]+H5_VERSION[ \t ]+"
150
+ )
151
+ message (DEBUG "HDF5 version define: ${_def} " )
152
+
153
+ if ("${_def} " MATCHES "H5_VERSION[ \t ]+\" ([0-9]+\\ .[0-9]+\\ .[0-9]+)" )
154
+ set (HDF5_VERSION "${CMAKE_MATCH_1} " )
155
155
endif ()
156
+ message (DEBUG "HDF5 version match 0, 1: ${CMAKE_MATCH_0} ${CMAKE_MATCH_1} " )
156
157
157
158
# avoid picking up incompatible zlib over the desired zlib
158
- if (CMAKE_VERSION VERSION_LESS 3.20 )
159
- get_filename_component (zlib_dir ${HDF5_C_INCLUDE_DIR} DIRECTORY )
160
- else ()
161
- cmake_path (GET HDF5_C_INCLUDE_DIR PARENT_PATH zlib_dir )
162
- endif ()
163
159
if (NOT ZLIB_ROOT )
164
- set (ZLIB_ROOT "${HDF5_ROOT} ;${zlib_dir} " )
160
+ get_filename_component (ZLIB_ROOT ${HDF5_C_INCLUDE_DIR} DIRECTORY )
161
+ list (APPEND ZLIB_ROOT ${HDF5_ROOT} )
165
162
endif ()
166
163
167
164
You can’t perform that action at this time.
0 commit comments