Add the INCLUDE_DIRECTORIES directive to all the FindXXX modules.
authorJunyan He <junyan.he@linux.intel.com>
Fri, 26 Apr 2013 23:56:55 +0000 (07:56 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Sat, 27 Apr 2013 10:53:01 +0000 (18:53 +0800)
If the header files are not at the standard location, we will FAIL
to compile because FIND_PATH directive will not add the Include Dir
to CXX flags. Add the INCLUDE_DIRECTORIES to handle this if we find
the headers we neeeds.

Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
CMake/FindDRM.cmake
CMake/FindDRMIntel.cmake
CMake/FindEGL.cmake
CMake/FindGBE.cmake
CMake/FindGBM.cmake
CMake/FindOCLIcd.cmake
CMake/FindXext.cmake
CMake/FindXfixes.cmake

index f65c457..3de35bf 100644 (file)
@@ -27,6 +27,7 @@ FIND_LIBRARY(DRM_LIBRARY
   DOC "The DRM library")
 
 IF(DRM_INCLUDE_PATH)
+  INCLUDE_DIRECTORIES(${DRM_INCLUDE_PATH})
   SET(DRM_FOUND 1 CACHE STRING "Set to 1 if DRM is found, 0 otherwise")
 ELSE(DRM_INCLUDE_PATH)
   SET(DRM_FOUND 0 CACHE STRING "Set to 1 if DRM is found, 0 otherwise")
index 2ab9c1f..2d45c64 100644 (file)
@@ -28,6 +28,7 @@ FIND_LIBRARY(DRM_INTEL_LIBRARY
   DOC "The DRM_INTEL library")
 
 IF(DRM_INTEL_INCLUDE_PATH)
+  INCLUDE_DIRECTORIES(${DRM_INTEL_INCLUDE_PATH})
   SET(DRM_INTEL_FOUND 1 CACHE STRING "Set to 1 if DRM_INTEL is found, 0 otherwise")
 ELSE(DRM_INTEL_INCLUDE_PATH)
   SET(DRM_INTEL_FOUND 0 CACHE STRING "Set to 1 if DRM_INTEL is found, 0 otherwise")
index 703ff64..69d4852 100644 (file)
@@ -27,6 +27,7 @@ FIND_LIBRARY(EGL_LIBRARY
   DOC "The EGL library")
 
 IF(EGL_INCLUDE_PATH)
+  INCLUDE_DIRECTORIES(${EGL_INCLUDE_PATH})
   SET(EGL_FOUND 1 CACHE STRING "Set to 1 if EGL is found, 0 otherwise")
 ELSE(EGL_INCLUDE_PATH)
   SET(EGL_FOUND 0 CACHE STRING "Set to 1 if EGL is found, 0 otherwise")
index 4670483..db938c7 100644 (file)
@@ -27,6 +27,7 @@ FIND_LIBRARY(GBE_LIBRARY
   DOC "The GBE library")
 
 IF(GBE_INCLUDE_PATH)
+  INCLUDE_DIRECTORIES(${GBE_INCLUDE_PATH})
   SET(GBE_FOUND 1 CACHE STRING "Set to 1 if GBE is found, 0 otherwise")
 ELSE(GBE_INCLUDE_PATH)
   SET(GBE_FOUND 0 CACHE STRING "Set to 1 if GBE is found, 0 otherwise")
index d3b6086..f20f4b2 100644 (file)
@@ -27,6 +27,7 @@ FIND_LIBRARY(GBM_LIBRARY
   DOC "The GBM library")
 
 IF(GBM_INCLUDE_PATH)
+  INCLUDE_DIRECTORIES(${GBM_INCLUDE_PATH})
   SET(GBM_FOUND 1 CACHE STRING "Set to 1 if GBM is found, 0 otherwise")
 ELSE(GBM_INCLUDE_PATH)
   SET(GBM_FOUND 0 CACHE STRING "Set to 1 if GBM is found, 0 otherwise")
index 076f00e..b0a8ad7 100644 (file)
@@ -15,6 +15,7 @@ FIND_PATH(OCLIcd_INCLUDE_PATH ocl_icd.h
   DOC "The directory where ocl_icd.h resides")
 
 IF(OCLIcd_INCLUDE_PATH)
+  INCLUDE_DIRECTORIES(${OCLIcd_INCLUDE_PATH})
   SET(OCLIcd_FOUND 1 CACHE STRING "Set to 1 if OCLIcd is found, 0 otherwise")
 ELSE(OCLIcd_INCLUDE_PATH)
   SET(OCLIcd_FOUND 0 CACHE STRING "Set to 1 if OCLIcd is found, 0 otherwise")
index 3025da8..5bbd719 100644 (file)
@@ -25,6 +25,7 @@ FIND_LIBRARY(XEXT_LIBRARY
   DOC "The XEXT library")
 
 IF(XEXT_INCLUDE_PATH)
+  INCLUDE_DIRECTORIES(${XEXT_INCLUDE_PATH})
   SET(XEXT_FOUND 1 CACHE STRING "Set to 1 if XEXT is found, 0 otherwise")
 ELSE(XEXT_INCLUDE_PATH)
   SET(XEXT_FOUND 0 CACHE STRING "Set to 1 if XEXT is found, 0 otherwise")
index 182e479..47259e1 100644 (file)
@@ -25,6 +25,7 @@ FIND_LIBRARY(XFIXES_LIBRARY
   DOC "The XFIXES library")
 
 IF(XFIXES_INCLUDE_PATH)
+  INCLUDE_DIRECTORIES(${XFIXES_INCLUDE_PATH})
   SET(XFIXES_FOUND 1 CACHE STRING "Set to 1 if XFIXES is found, 0 otherwise")
 ELSE(XFIXES_INCLUDE_PATH)
   SET(XFIXES_FOUND 0 CACHE STRING "Set to 1 if XFIXES is found, 0 otherwise")