[gdal-dev] cmake status update - 99% good news!

Even Rouault even.rouault at spatialys.com
Tue Jan 25 11:57:04 PST 2022


>
> HDF5 is a bit confusing. Here I use the same settings that I use to build NetCDF, some settings are likely repeated but it works to build netCDF
>
> set(HDF5_path C:/programs/compa_libs/hdf5-1.10.5)
> set(HDF5_ROOT_DIR ${HDF5_path}/compileds/VC14_64)
> set(HDF5_INCLUDE_DIRS ${HDF5_path}/compileds/VC14_32/include)
> set(HDF5_LIBRARIES ${HDF5_path}/compileds/VC14_64/lib/hdf5.lib 	${HDF5_path}/compileds/VC14_64/lib/hdf5_hl.lib 	${HDF5_path}/compileds/VC14_${BITAGE}/lib/hdf5_hl_cpp.lib 	${HDF5_path}/compileds/VC14_${BITAGE}/lib/hdf5_cpp.lib)
> set(HDF5_HL_LIBRARIES ${HDF5_path}/compileds/VC14_64/lib/hdf5.lib 	${HDF5_path}/compileds/VC14_${BITAGE}/lib/hdf5_hl.lib 	${HDF5_path}/compileds/VC14_${BITAGE}/lib/hdf5_hl_cpp.lib 	${HDF5_path}/compileds/VC14_${BITAGE}/lib/hdf5_cpp.lib)
>
> but the build complains with
>
> -- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found version "1.10.5")

GDAL use the FindHDF5.cmake module provided by CMake itself : 
https://cmake.org/cmake/help/latest/module/FindHDF5.html / 
https://github.com/Kitware/CMake/blob/master/Modules/FindHDF5.cmake

I doubt you can directly specify HDF5_INCLUDE_DIRS, HDF5_LIBRARIES and 
HDF5_HL_LIBRARIES as they are output variables of the FindHDF5 module, 
not input variables

I'd say you should rather set HDF5_ROOT=${HDF5_path}/compileds/VC14_64

You may instrument the FindHDF5.cmake file to have more details

>
>>> For ECW, it looks like I tested on Windows with ECW 5.5
> I use SDK 3.3 and
>
> -- Could NOT find ECW (missing: ECWnet_LIBRARY ECWC_LIBRARY NCSUtil_LIBRARY) (found version "NCS_VERSION_NUMBER 3.3.0.161")

If you have a standard layout ( ${prefix}/include and ${prefix}/lib ) 
then specifying ECW_ROOT=${prefix} should normally work out of the box.

Logic is at 
https://github.com/OSGeo/gdal/blob/master/cmake/modules/packages/FindECW.cmake

>
>> For MrSID, not sure I tested on Windows. Works on Linux with
> DSDK-9.5.4.4709-rhel6
>
> I don't really know what to set in this one. I have MrSID_DSDK-8.5.0.3422, that works in the nmake build
>
> 	set(MRSID_INCLUDE_DIR "C:/programs/compa_libs/MrSID_DSDK-8.5.0.3422/compileds/VC14_64/include")
> 	set(MRSID_LIBRARY "C:/programs/compa_libs/MrSID_DSDK-8.5.0.3422/compileds/VC14_64/lib/lti_dsdk.lib")
Looks good. If you want to debug the logic, it is at 
https://github.com/OSGeo/gdal/blob/master/cmake/modules/packages/FindMRSID.cmake
> and get
>
> -- Could NOT find ECW (missing: ECWnet_LIBRARY ECWC_LIBRARY NCSUtil_LIBRARY) (found version "NCS_VERSION_NUMBER 3.3.0.161")
That's not the right message

-- 
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list