Skip to content
Snippets Groups Projects
Commit 6f9885fe authored by Ben Boeckel's avatar Ben Boeckel
Browse files

FindGDAL: prefer using gdal-config if available

parent 0de3b210
No related branches found
No related tags found
No related merge requests found
......@@ -60,17 +60,6 @@ GDAL installation prefix.
#
#include "gdal.h"
find_path(GDAL_INCLUDE_DIR gdal.h
HINTS
${GDAL_ROOT}
ENV GDAL_DIR
ENV GDAL_ROOT
PATH_SUFFIXES
include/gdal
include/GDAL
include
)
if(UNIX)
# Use gdal-config to obtain the library version (this should hopefully
# allow us to -lgdal1.x.y where x.y are correct version)
......@@ -133,6 +122,17 @@ if(UNIX)
endif()
endif()
find_path(GDAL_INCLUDE_DIR gdal.h
HINTS
${GDAL_ROOT}
ENV GDAL_DIR
ENV GDAL_ROOT
PATH_SUFFIXES
include/gdal
include/GDAL
include
)
find_library(GDAL_LIBRARY
NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
HINTS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment