Changeset 1295:7979f84370b6


Ignore:
Timestamp:
09/27/09 11:06:09 (10 months ago)
Author:
Mateusz Loskot <mateusz@…>
Branch:
default
Message:

[cmake] Added requirement of GeoTIFF support if GDAL support was selected.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r1294 r1295  
    8686ENDIF() 
    8787 
    88 # GDAL/OGR support - optional, default=OFF 
    89 SET(WITH_GDAL FALSE CACHE BOOL "Choose if GDAL support should be built") 
    90  
    91 IF(WITH_GDAL) 
    92     FIND_PACKAGE(GDAL 1.6.0) 
    93  
    94     IF(GDAL_FOUND) 
    95         INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIR}) 
    96             ADD_DEFINITIONS(-DHAVE_GDAL=1) 
    97     ENDIF() 
    98 ENDIF() 
    99  
    10088# GeoTIFF support - optional, default=OFF 
    10189SET(WITH_GEOTIFF FALSE CACHE BOOL "Choose if GeoTIFF support should be built") 
     
    10795        INCLUDE_DIRECTORIES(${GEOTIFF_INCLUDE_DIR}) 
    10896        ADD_DEFINITIONS(-DHAVE_LIBGEOTIFF=1) 
     97    ENDIF() 
     98ENDIF() 
     99 
     100# GDAL/OGR support - optional, default=OFF 
     101SET(WITH_GDAL FALSE CACHE BOOL "Choose if GDAL support should be built") 
     102 
     103IF(WITH_GDAL) 
     104    IF (NOT GEOTIFF_FOUND) 
     105        MESSAGE(FATAL_ERROR "GDAL support requires GeoTIFF library which was not selected") 
     106    ENDIF() 
     107 
     108    FIND_PACKAGE(GDAL 1.6.0) 
     109 
     110    IF(GDAL_FOUND) 
     111        INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIR}) 
     112            ADD_DEFINITIONS(-DHAVE_GDAL=1) 
    109113    ENDIF() 
    110114ENDIF() 
Note: See TracChangeset for help on using the changeset viewer.