File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,18 @@ file(READ ${CMAKE_CURRENT_LIST_DIR}/libraries.json json)
3838# --- Zlib
3939if (build_zlib)
4040 set (zlib_dep DEPENDS ZLIB)
41- if (TARGET ZLIB::ZLIB)
42- add_custom_target (ZLIB)
43- else ()
44- include (${CMAKE_CURRENT_LIST_DIR} /zlib.cmake)
45- endif ()
4641else ()
4742 set (zlib_dep)
4843endif ()
4944
45+ if (TARGET ZLIB::ZLIB)
46+ add_custom_target (ZLIB)
47+ elseif (h5fortran_find)
48+ find_package (ZLIB)
49+ else ()
50+ include (${CMAKE_CURRENT_LIST_DIR} /zlib.cmake)
51+ endif ()
52+
5053# --- HDF5
5154# https://forum.hdfgroup.org/t/issues-when-using-hdf5-as-a-git-submodule-and-using-cmake-with-add-subdirectory/7189/2
5255
Original file line number Diff line number Diff line change 33include (GNUInstallDirs)
44include (ExternalProject)
55
6+ if (NOT DEFINED zlib_key)
7+ set (zlib_key zlib2)
8+ endif ()
9+
610if (NOT zlib_url)
711string (JSON zlib_url GET ${json} ${zlib_key} )
812endif ()
You can’t perform that action at this time.
0 commit comments