From 9f53e328f47c15cbbcb9936a9d33cfc39ba2473d Mon Sep 17 00:00:00 2001 From: Paul Harris Date: Thu, 26 May 2022 08:34:17 +0800 Subject: [PATCH] Fix libraries for CURL and HDF5 CURL_LIBRARY should have always been CURL_LIBRARIES And always include HDF5_LIBRARIES in case HDF5_C_LIBRARIES is not available. There are plenty of other changes that could be made to upgrade to the newer cmake ... such as linking to CURL::libcurl and HDF5::HDF5 instead. --- liblib/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt index abd017219..aa3a842d9 100644 --- a/liblib/CMakeLists.txt +++ b/liblib/CMakeLists.txt @@ -116,14 +116,14 @@ IF(USE_HDF5) # builds: # Make sure that HDF5_C_LIBRARY appears *after* # HDF5_HL_LIBRARY. - SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) + SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES} ${HDF5_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) ELSE() # Windows CMake defines HDF5_LIBRARIES. SET(TLL_LIBS ${HDF5_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) ENDIF() ENDIF() IF(FOUND_CURL) - SET(TLL_LIBS ${TLL_LIBS} ${CURL_LIBRARY}) + SET(TLL_LIBS ${TLL_LIBS} ${CURL_LIBRARIES}) ENDIF() IF(USE_HDF4)