cmake: list zip libs before szip
as szip libs references libz as optimized, the REMOVE_DUPLICATES strips zlib out of TLL_LIBS but not its optimized keyword resulting in an invalid list
just list zip before fixes the issue (or removing the REMOVE_DUPLICATES of TLL_LIBS)
@@ -85,6 +85,10 @@ IF(HAVE_LIBDL)
SET(TLL_LIBS ${LIBDL} ${TLL_LIBS})
ENDIF()
+IF(ENABLE_NCZARR_ZIP)
+ SET(TLL_LIBS ${TLL_LIBS} ${Zip_LIBRARIES})
+ENDIF()
+
IF(USE_HDF5)
IF(NOT MSVC)
# Some version of cmake define HDF5_hdf5_LIBRARY instead of
@@ -117,10 +121,6 @@ IF(ENABLE_PNETCDF AND PNETCDF)
SET(TLL_LIBS ${TLL_LIBS} ${PNETCDF})
ENDIF()
-IF(ENABLE_NCZARR_ZIP)
- SET(TLL_LIBS ${TLL_LIBS} ${Zip_LIBRARIES})
-ENDIF()
-
IF(ENABLE_S3_SDK)
# TARGET_LINK_DIRECTORIES(netcdf PUBLIC ${AWSSDK_LIB_DIR})
TARGET_LINK_LIBRARIES(netcdf ${AWS_LINK_LIBRARIES})
