gdal.cmake 767 Bytes
Newer Older
1
superbuild_add_project(gdal
Ben Boeckel's avatar
Ben Boeckel committed
2
  DEPENDS zlib
Ben Boeckel's avatar
Ben Boeckel committed
3
  DEPENDS_OPTIONAL cxx11
Ben Boeckel's avatar
Ben Boeckel committed
4 5 6 7 8
  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
9
    -DGDAL_ENABLE_FRMT_VRT:BOOL=ON
10 11 12
    -DOGR_ENABLE_SHP:BOOL=ON
    -DGDAL_ENABLE_FRMT_MEM:BOOL=ON
    -DOGR_ENABLE_MEM:BOOL=ON)
Ben Boeckel's avatar
Ben Boeckel committed
13

14 15 16
superbuild_apply_patch(gdal lt_objdir-warning
  "Fix warning about LT_OBJDIR redefinition")

Ben Boeckel's avatar
Ben Boeckel committed
17 18 19 20 21 22 23 24
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 ()

25
superbuild_add_extra_cmake_args(
Ben Boeckel's avatar
Ben Boeckel committed
26 27
  -DGDAL_INCLUDE_DIR:FILEPATH=<INSTALL_DIR>/include/gdal
  -DGDAL_LIBRARY:FILEPATH=${gdal_lib})