Some more news on this before I lose track of it.

Couldn't find a way to build against my HDF5 1.10.5 (everything I tried failed) 
so built HDF51.12.1 and now simple setting

set(HDF5_ROOT "C:/programs/compa_libs/hdf5-1.12.1/compileds/VC14_64")

finds it and no more troubles (yet found)

But I found two other new issues when adding more dependencies

1.
C:\programs\compa_libs\gdal_GIT\frmts\mbtiles\mbtilesdataset.cpp(45): fatal 
error C1083: Cannot open include file: 'zlib.h': No such file or directory

To work around this, I temporarily added zlib.h and zconf.h to frmts\mbtiles  

2.
C:\programs\compa_libs\libxml2-2.9.1\compileds\VC14_64\include\libxml/encoding.h(28):
 fatal error C1083: Cannot open include file: 'iconv.h': No such file or 
directory

Didn't try to find a fix to this one.

>
> 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/lt
> i_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.

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to