[Liblas-commits] hg: [cmake] Added requirement of GeoTIFF support if GDAL support...

liblas-commits at liblas.org liblas-commits at liblas.org
Sun Sep 27 14:06:20 EDT 2009


changeset 7979f84370b6 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=7979f84370b6
summary: [cmake] Added requirement of GeoTIFF support if GDAL support was selected.

diffstat:

 CMakeLists.txt |  28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diffs (45 lines):

diff -r 66d3d9cf0e8c -r 7979f84370b6 CMakeLists.txt
--- a/CMakeLists.txt	Sun Sep 27 18:03:55 2009 +0100
+++ b/CMakeLists.txt	Sun Sep 27 19:06:09 2009 +0100
@@ -85,18 +85,6 @@
     ENDIF()
 ENDIF()
 
-# GDAL/OGR support - optional, default=OFF
-SET(WITH_GDAL FALSE CACHE BOOL "Choose if GDAL support should be built")
-
-IF(WITH_GDAL)
-    FIND_PACKAGE(GDAL 1.6.0)
-
-    IF(GDAL_FOUND)
-        INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIR})
-	    ADD_DEFINITIONS(-DHAVE_GDAL=1)
-    ENDIF()
-ENDIF()
-
 # GeoTIFF support - optional, default=OFF
 SET(WITH_GEOTIFF FALSE CACHE BOOL "Choose if GeoTIFF support should be built")
 
@@ -109,6 +97,22 @@
     ENDIF()
 ENDIF()
 
+# GDAL/OGR support - optional, default=OFF
+SET(WITH_GDAL FALSE CACHE BOOL "Choose if GDAL support should be built")
+
+IF(WITH_GDAL)
+    IF (NOT GEOTIFF_FOUND)
+        MESSAGE(FATAL_ERROR "GDAL support requires GeoTIFF library which was not selected")
+    ENDIF()
+
+    FIND_PACKAGE(GDAL 1.6.0)
+
+    IF(GDAL_FOUND)
+        INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIR})
+	    ADD_DEFINITIONS(-DHAVE_GDAL=1)
+    ENDIF()
+ENDIF()
+
 # Spatial Index support - optional, default=OFF
 SET(WITH_SPATIALINDEX FALSE CACHE BOOL "Choose if GeoTIFF support should be built")
 


More information about the Liblas-commits mailing list