gdal.cmake 572 Bytes
Newer Older
1
add_external_project(gdal
Ben Boeckel's avatar
Ben Boeckel committed
2 3 4 5 6 7
  DEPENDS zlib
  CMAKE_ARGS
    -DGDAL_USE_CURL:BOOL=OFF
    -DGDAL_USE_LIBJPEG_INTERNAL:BOOL=ON
    -DGDAL_USE_LIBTIFF_INTERNAL:BOOL=ON
    -DGDAL_ENABLE_FRMT_PDF:BOOL=OFF
8 9
    -DGDAL_ENABLE_FRMT_VRT:BOOL=ON
    -DOGR_ENABLE_SHP:BOOL=ON)
Ben Boeckel's avatar
Ben Boeckel committed
10 11 12 13 14 15 16 17 18 19 20 21

if (APPLE)
  set(gdal_lib <INSTALL_DIR>/lib/libgdal111.dylib)
elseif (WIN32)
  set(gdal_lib <INSTALL_DIR>/lib/gdal111.lib)
else ()
  set(gdal_lib <INSTALL_DIR>/lib/libgdal111.so)
endif ()

add_extra_cmake_args(
  -DGDAL_INCLUDE_DIR:FILEPATH=<INSTALL_DIR>/include/gdal
  -DGDAL_LIBRARY:FILEPATH=${gdal_lib})