[Beignet] [PATCH] Add the INCLUDE_DIRECTORIES directive to all the FindXXX modules.
Zhigang Gong
zhigang.gong at linux.intel.com
Sat Apr 27 03:59:11 PDT 2013
LGTM, pushed. Thanks.
On Sat, Apr 27, 2013 at 07:56:55AM +0800, junyan.he at linux.intel.com wrote:
> From: Junyan He <junyan.he at linux.intel.com>
>
> 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 at linux.intel.com>
> ---
> CMake/FindDRM.cmake | 1 +
> CMake/FindDRMIntel.cmake | 1 +
> CMake/FindEGL.cmake | 1 +
> CMake/FindGBE.cmake | 1 +
> CMake/FindGBM.cmake | 1 +
> CMake/FindOCLIcd.cmake | 1 +
> CMake/FindXext.cmake | 1 +
> CMake/FindXfixes.cmake | 1 +
> 8 files changed, 8 insertions(+)
>
> diff --git a/CMake/FindDRM.cmake b/CMake/FindDRM.cmake
> index f65c457..3de35bf 100644
> --- a/CMake/FindDRM.cmake
> +++ b/CMake/FindDRM.cmake
> @@ -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")
> diff --git a/CMake/FindDRMIntel.cmake b/CMake/FindDRMIntel.cmake
> index 2ab9c1f..2d45c64 100644
> --- a/CMake/FindDRMIntel.cmake
> +++ b/CMake/FindDRMIntel.cmake
> @@ -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")
> diff --git a/CMake/FindEGL.cmake b/CMake/FindEGL.cmake
> index 703ff64..69d4852 100644
> --- a/CMake/FindEGL.cmake
> +++ b/CMake/FindEGL.cmake
> @@ -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")
> diff --git a/CMake/FindGBE.cmake b/CMake/FindGBE.cmake
> index 4670483..db938c7 100644
> --- a/CMake/FindGBE.cmake
> +++ b/CMake/FindGBE.cmake
> @@ -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")
> diff --git a/CMake/FindGBM.cmake b/CMake/FindGBM.cmake
> index d3b6086..f20f4b2 100644
> --- a/CMake/FindGBM.cmake
> +++ b/CMake/FindGBM.cmake
> @@ -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")
> diff --git a/CMake/FindOCLIcd.cmake b/CMake/FindOCLIcd.cmake
> index 076f00e..b0a8ad7 100644
> --- a/CMake/FindOCLIcd.cmake
> +++ b/CMake/FindOCLIcd.cmake
> @@ -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")
> diff --git a/CMake/FindXext.cmake b/CMake/FindXext.cmake
> index 3025da8..5bbd719 100644
> --- a/CMake/FindXext.cmake
> +++ b/CMake/FindXext.cmake
> @@ -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")
> diff --git a/CMake/FindXfixes.cmake b/CMake/FindXfixes.cmake
> index 182e479..47259e1 100644
> --- a/CMake/FindXfixes.cmake
> +++ b/CMake/FindXfixes.cmake
> @@ -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")
> --
> 1.7.9.5
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list