[gdal-dev] Building GDAL on Windows 32 and 64 bit

Joaquim Luis jluis at ualg.pt
Tue May 31 06:03:51 PDT 2016


> Again, I can only speak from experience.  I wish that magically I am  
> wrong for GDAL, and cmake on Windows is maintained for each and every  
> GDAL driver :)  (whoa that is a big wish)
>
> -jeff
>

Jeff,

Life doesn't have to be so painful with Cmake on Windows. For example in  
GMT we use a optionally include ConfigUser.cmake where one can define  
dependencies that are built in non-cmake ways.
For example to add the GDAL dependency I define this in ConfigUser.cmake  
file. Here the the ${VC} and ${BITAGE} are just variables used to select  
different VS versions and "bitages".
So not all the dependencies need to be build with Cmake too.

   # set location of gdal (can be root directory, path to header file or  
path to gdal-config):
   set(GDAL_DIR "C:/programs/GDALtrunk/gdal/compileds/${VC}_${BITAGE}")
   set(GDAL_LIBRARY  
"C:/programs/GDALtrunk/gdal/compileds/${VC}_${BITAGE}/lib/gdal_i.lib")

Joaquim


More information about the gdal-dev mailing list