Commit 66006339 authored by Joachim Pouderoux's avatar Joachim Pouderoux
Browse files

Add GDAL to superbuild

parent b51c529f
......@@ -47,6 +47,7 @@ function (superbuild_find_projects var)
cuda
embree
freetype
gdal
hdf5
ispc
las
......@@ -102,6 +103,7 @@ function (superbuild_find_projects var)
ffi
ffmpeg
fortran
gdal
genericio
lapack
libxml2
......
superbuild_add_project(gdal
DEPENDS zlib
DEPENDS_OPTIONAL cxx11
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
-DGDAL_ENABLE_FRMT_VRT:BOOL=ON
-DOGR_ENABLE_SHP:BOOL=ON
-DGDAL_ENABLE_FRMT_MEM:BOOL=ON
-DOGR_ENABLE_MEM:BOOL=ON)
superbuild_apply_patch(gdal no-sqlite
"Disable sqlite support in GML")
superbuild_apply_patch(gdal lt_objdir-warning
"Fix warning about LT_OBJDIR redefinition")
superbuild_apply_patch(gdal no-geos
"Skip GEOS and Armadillo support")
superbuild_apply_patch(gdal pointer-comparison
"Fix illegal pointer comparisons")
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 ()
superbuild_add_extra_cmake_args(
-DGDAL_ROOT:PATH=<INSTALL_DIR>
-DGDAL_INCLUDE_DIR:PATH=<INSTALL_DIR>/include/gdal
-DGDAL_LIBRARY:FILEPATH=${gdal_lib})
......@@ -140,7 +140,7 @@ superbuild_add_project(paraview
DEBUGGABLE
DEFAULT_ON
DEPENDS_OPTIONAL
adios2 cuda boost hdf5 matplotlib mpi numpy png protobuf
adios2 cuda boost gdal hdf5 matplotlib mpi numpy png protobuf
python python2 python3 qt5 visitbridge zlib silo las
xdmf3 ospray vrpn vtkm tbb netcdf
nlohmannjson
......@@ -162,6 +162,7 @@ superbuild_add_project(paraview
-DPARAVIEW_ENABLE_ADIOS2:BOOL=${adios2_enabled}
-DPARAVIEW_ENABLE_COSMOTOOLS:BOOL=${cosmotools_enabled}
-DPARAVIEW_ENABLE_FFMPEG:BOOL=${ffmpeg_enabled}
-DPARAVIEW_ENABLE_GDAL:BOOL=${gdal_enabled}
-DPARAVIEW_ENABLE_LAS:BOOL=${las_enabled}
-DPARAVIEW_ENABLE_MOTIONFX:BOOL=${PARAVIEW_ENABLE_MOTIONFX}
-DPARAVIEW_ENABLE_VISITBRIDGE:BOOL=${visitbridge_enabled}
......
diff --git a/cmake/cpl_config.h.cmake b/cmake/cpl_config.h.cmake
index 58feff6..67eaeed 100644
--- a/cmake/cpl_config.h.cmake
+++ b/cmake/cpl_config.h.cmake
@@ -140,10 +140,6 @@
/* For .cpp files, define as const if the declaration of iconv() needs const. */
//#undef ICONV_CPP_CONST
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR "@LT_OBJDIR@"
-
/* Define for Mac OSX Framework build */
#cmakedefine MACOSX_FRAMEWORK
diff -Nr -U5 gdal-98353693d6f1d607954220b2f8b040375e3d1744/alg/CMakeLists.txt gdal-98353693d6f1d607954220b2f8b040375e3d1744.no-geos/alg/CMakeLists.txt
--- gdal-98353693d6f1d607954220b2f8b040375e3d1744/alg/CMakeLists.txt 2016-12-08 12:42:59.000000000 -0500
+++ gdal-98353693d6f1d607954220b2f8b040375e3d1744.no-geos/alg/CMakeLists.txt 2017-04-13 08:39:31.959865767 -0400
@@ -29,20 +29,20 @@
set(LIB_NAME "alg")
project ("lib${LIB_NAME}")
include_directories(${GDAL_ROOT_SOURCE_DIR}/frmts/gtiff)
-find_package(GEOS)
+#find_package(GEOS)
if(GEOS_FOUND)
get_filename_component(GEOS_ROOT ${GEOS_INCLUDE_DIR} PATH)
include_directories(${GEOS_INCLUDE_DIR})
include_directories(${GEOS_ROOT}/capi)
add_definitions(-DHAVE_GEOS=1)
set(GDAL_HAVE_GEOS ON PARENT_SCOPE)
endif(GEOS_FOUND)
-find_package(Armadillo)
+#find_package(Armadillo)
if(ARMADILLO_FOUND)
include_directories(${GEOS_INCLUDE_DIRS})
add_definitions(-DHAVE_ARMADILLO)
set(GDAL_HAVE_ARMADILLO ON PARENT_SCOPE)
endif(ARMADILLO_FOUND)
diff -Nru5 gdal-98353693d6f1d607954220b2f8b040375e3d1744/ogr/ogrsf_frmts/gml/CMakeLists.txt gdal-98353693d6f1d607954220b2f8b040375e3d1744.no-sqlite/ogr/ogrsf_frmts/gml/CMakeLists.txt
--- gdal-98353693d6f1d607954220b2f8b040375e3d1744/ogr/ogrsf_frmts/gml/CMakeLists.txt 2016-12-08 12:42:59.000000000 -0500
+++ gdal-98353693d6f1d607954220b2f8b040375e3d1744.no-sqlite/ogr/ogrsf_frmts/gml/CMakeLists.txt 2017-04-14 10:14:27.425063396 -0400
@@ -42,11 +42,11 @@
# ifeq ($(HAVE_XERCES),yes)
# CPPFLAGS += -DHAVE_XERCES
# endif
-find_package(Sqlite3)
+#find_package(Sqlite3)
if(SQLITE3_FOUND)
include_directories(${SQLITE3_INCLUDE_DIR})
add_definitions(-DHAVE_SQLITE)
set(GDAL_HAVE_SQLITE ON CACHE INTERNAL "GDAL_HAVE_SQLITE")
endif(SQLITE3_FOUND)
diff -U 3 -r src/frmts/gtiff/gt_citation.cpp src-mod/frmts/gtiff/gt_citation.cpp
--- src/frmts/gtiff/gt_citation.cpp 2016-12-08 12:42:59.000000000 -0500
+++ src-mod/frmts/gtiff/gt_citation.cpp 2017-09-25 23:46:10.000000000 -0400
@@ -155,7 +155,7 @@
if(p1[0] == '\0' || p1[0] == '\n' || p1[0] == ' ')
p1 --;
p2 = p1 - 1;
- while( p2>0 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
+ while( p2 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
p2--;
if(p2 != p1 - 1)
p1 = p2;
@@ -198,7 +198,7 @@
if(p1[0] == '\0' || p1[0] == '\n' || p1[0] == ' ')
p1 --;
char* p2 = p1 - 1;
- while( p2>0 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
+ while( p2 && (p2[0] == ' ' || p2[0] == '\0' || p2[0] == '\n') )
p2--;
if(p2 != p1 - 1)
p1 = p2;
......@@ -209,3 +209,8 @@ superbuild_set_revision(protobuf
GIT_REPOSITORY "https://github.com/protocolbuffers/protobuf"
GIT_TAG 2.7.0
SOURCE_SUBDIR cmake)
superbuild_set_revision(gdal
# https://github.com/judajake/gdal-svn.git
URL "https://www.paraview.org/files/dependencies/gdal-98353693d6f1d607954220b2f8b040375e3d1744.tar.bz2"
URL_MD5 5aa285dcc856f98ce44020ae1ae192cb)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment