fix cmake build with ENABLE_HDF4 and hdf requiring jpeg

Currently, the build fails because jpeg libraries are not linked in.
There is already a HDF4_LIBRARIES that always includes HDF4_MFHDF_LIB and
HDF4_DF_LIB (in cmake/dependencies.cmake), but this is never used.
HDF4_LIBRARIES will also include jpeg libraries, if required.

Fix build by linking against jpeg by linking against HDF4_LIBRARIES instead
of the two more specific variables.
This commit is contained in:
Martin Aumüller 2024-03-01 09:18:43 +01:00
parent 6bcfb4bf8a
commit 9277878e6f

View File

@ -137,7 +137,7 @@ IF(FOUND_CURL)
ENDIF()
IF(USE_HDF4)
SET(TLL_LIBS ${HDF4_MFHDF_LIB} ${HDF4_DF_LIB} ${TLL_LIBS})
SET(TLL_LIBS ${HDF4_LIBRARIES} ${TLL_LIBS})
ENDIF()
IF(ENABLE_PNETCDF AND PNETCDF)