--- modules/FindGDAL.cmake	2015-01-19 12:47:17.000000000 -0500
+++ modules/FindGDAL.cmake	2015-01-19 12:50:39.000000000 -0500
@@ -52,23 +52,6 @@
 #
 #include "gdal.h"
 
-find_path(GDAL_INCLUDE_DIR gdal.h
-  HINTS
-    ENV GDAL_DIR
-    ENV GDAL_ROOT
-  PATH_SUFFIXES
-     include/gdal
-     include/GDAL
-     include
-  PATHS
-      ~/Library/Frameworks/gdal.framework/Headers
-      /Library/Frameworks/gdal.framework/Headers
-      /sw # Fink
-      /opt/local # DarwinPorts
-      /opt/csw # Blastwave
-      /opt
-)
-
 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)
@@ -94,9 +77,32 @@
             string(REGEX MATCHALL "-L[^ ]+" _gdal_dashL ${GDAL_CONFIG_LIBS})
             string(REPLACE "-L" "" _gdal_libpath "${_gdal_dashL}")
         endif()
+        exec_program(${GDAL_CONFIG} ARGS --cflags OUTPUT_VARIABLE GDAL_CONFIG_INCS)
+        if(GDAL_CONFIG_INCS)
+            string(REGEX MATCHALL "-I[^ ]+" _gdal_dashI ${GDAL_CONFIG_INCS})
+            string(REPLACE "-I" "" _gdal_cpath "${_gdal_dashI}")
+        endif()
     endif()
 endif()
 
+find_path(GDAL_INCLUDE_DIR gdal.h
+  HINTS
+    ENV GDAL_DIR
+    ENV GDAL_ROOT
+    ${_gdal_cpath}
+  PATH_SUFFIXES
+     include/gdal
+     include/GDAL
+     include
+  PATHS
+      ~/Library/Frameworks/gdal.framework/Headers
+      /Library/Frameworks/gdal.framework/Headers
+      /sw # Fink
+      /opt/local # DarwinPorts
+      /opt/csw # Blastwave
+      /opt
+)
+
 find_library(GDAL_LIBRARY
   NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
   HINTS
