Skip to content

Commit 123a6b4

Browse files
committed
fix Zlib HDF5 depends
1 parent 2e26a3b commit 123a6b4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

cmake/hdf5.cmake

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ set(HDF5_INCLUDE_DIRS ${CMAKE_INSTALL_FULL_INCLUDEDIR})
4040
file(READ ${CMAKE_CURRENT_LIST_DIR}/libraries.json json)
4141

4242
# --- Zlib
43-
if(build_zlib)
44-
set(zlib_dep DEPENDS ZLIB)
45-
else()
46-
set(zlib_dep)
47-
endif()
43+
set(zlib_dep)
4844

4945
if(TARGET ZLIB::ZLIB)
5046
add_custom_target(ZLIB)
@@ -53,6 +49,7 @@ elseif(h5fortran_find AND NOT build_zlib)
5349
endif()
5450

5551
if(NOT TARGET ZLIB::ZLIB)
52+
set(zlib_dep DEPENDS ZLIB)
5653
include(${CMAKE_CURRENT_LIST_DIR}/zlib.cmake)
5754
endif()
5855

0 commit comments

Comments
 (0)