Skip to content

Commit 8001279

Browse files
committed
Raster is required to make the PostGIS extension
1 parent 9827ba6 commit 8001279

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

CMake/External_PostGIS.cmake

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,16 @@ endif()
4444

4545
# When raster support is desired in PostGIS (i.e. when enabling OSM2PGSQL), one
4646
# can populate the args with --with-gdalconfig=/path-to-gdal
47-
if( fletch_ENABLE_OSM2PGSQL )
48-
if (fletch_ENABLE_GDAL)
49-
set(_PostGIS_ARGS_GDAL --with-gdalconfig=${GDAL_ROOT}/bin/gdal-config)
50-
list(APPEND _PostGIS_DEPENDS GDAL)
47+
if (fletch_ENABLE_GDAL)
48+
set(_PostGIS_ARGS_GDAL --with-gdalconfig=${GDAL_ROOT}/bin/gdal-config)
49+
list(APPEND _PostGIS_DEPENDS GDAL)
50+
else()
51+
find_program(_gdal_config gdal-config)
52+
if (NOT _gdal_config)
53+
message(ERROR " GDAL is required to build PostGIS with raster support. Please enable or install." )
5154
else()
52-
find_program(_gdal_config gdal-config)
53-
if (NOT _gdal_config)
54-
set(_PostGIS_ARGS_GDAL --without-raster )
55-
else()
56-
set(_PostGIS_ARGS_GDAL --with-gdalconfig=${_gdal_config})
57-
endif()
55+
set(_PostGIS_ARGS_GDAL --with-gdalconfig=${_gdal_config})
5856
endif()
59-
else()
60-
set(_PostGIS_ARGS_GDAL --without-raster )
6157
endif()
6258

6359
set(_PostGIS_CONFIGURE_COMMAND

0 commit comments

Comments
 (0)