diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2012-03-28 22:00:54 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-08-14 19:02:58 (GMT) |
commit | b04650e163320353762b6ec196afa9500345b5cd (patch) | |
tree | 1790b38ae7db75f232a27f4aa796d4441c68f009 /Modules/FindGDAL.cmake | |
parent | cd3bd23266a4a6c00595134a17a8bdaea9e28af5 (diff) | |
download | CMake-b04650e163320353762b6ec196afa9500345b5cd.zip CMake-b04650e163320353762b6ec196afa9500345b5cd.tar.gz CMake-b04650e163320353762b6ec196afa9500345b5cd.tar.bz2 |
use the find_* functions ENV parameter
Instead of directly passing $ENV{SOMEVAR} to a find_* call pass in ENV SOMEVAR.
This will make sure the paths will get correctly handled through different
platforms, especially on Windows.
Also fixes one place where paths with windows delimiters (\) were hardcoded to
use forward slashes.
Diffstat (limited to 'Modules/FindGDAL.cmake')
-rw-r--r-- | Modules/FindGDAL.cmake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/FindGDAL.cmake b/Modules/FindGDAL.cmake index 1e09b82..b620ab1 100644 --- a/Modules/FindGDAL.cmake +++ b/Modules/FindGDAL.cmake @@ -42,8 +42,8 @@ find_path(GDAL_INCLUDE_DIR gdal.h HINTS - $ENV{GDAL_DIR} - $ENV{GDAL_ROOT} + ENV GDAL_DIR + ENV GDAL_ROOT PATH_SUFFIXES include/gdal include/GDAL @@ -64,8 +64,8 @@ if(UNIX) # libgdal.so... find_program(GDAL_CONFIG gdal-config HINTS - $ENV{GDAL_DIR} - $ENV{GDAL_ROOT} + ENV GDAL_DIR + ENV GDAL_ROOT PATH_SUFFIXES bin PATHS /sw # Fink @@ -88,8 +88,8 @@ endif() find_library(GDAL_LIBRARY NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL HINTS - $ENV{GDAL_DIR} - $ENV{GDAL_ROOT} + ENV GDAL_DIR + ENV GDAL_ROOT ${_gdal_libpath} PATH_SUFFIXES lib64 lib PATHS |