summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@intel.com>2014-01-14 09:33:00 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-01-14 09:36:38 +0800
commita979dcc2f4290f9c39459abbee0eca9adbcdff4c (patch)
treeb691d21c706a67b16b57e5f38ebf73daa46c1c52 /CMake
parente427b3eac67a9513eae4a0d352ed94d798cc7334 (diff)
downloadbeignet-a979dcc2f4290f9c39459abbee0eca9adbcdff4c.tar.gz
Revert faulty pushed patchset
This reverts: Revert "GBE: fixed a long related bug." Revert "Refine the method to find pch and pcm files." Revert "GBE: enable relocatable pch files." Revert "CL: prepare to support ICD if the system has ocl-icd.." Revert "CL: back port ICD support to 1.1 branch." The above patches are merged by accident without review comments and are broken. Now revert them.
Diffstat (limited to 'CMake')
-rw-r--r--CMake/FindGBE.cmake37
1 files changed, 37 insertions, 0 deletions
diff --git a/CMake/FindGBE.cmake b/CMake/FindGBE.cmake
new file mode 100644
index 00000000..db938c7b
--- /dev/null
+++ b/CMake/FindGBE.cmake
@@ -0,0 +1,37 @@
+#
+# Try to find X library and include path.
+# Once done this will define
+#
+# GBE_FOUND
+# GBE_INCLUDE_PATH
+# GBE_LIBRARY
+#
+
+FIND_PATH(GBE_INCLUDE_PATH gen/program.h
+ ~/include/
+ /usr/include/
+ /usr/local/include/
+ /sw/include/
+ /opt/local/include/
+ DOC "The directory where gen/program.h resides")
+FIND_LIBRARY(GBE_LIBRARY
+ NAMES GBE gbe
+ PATHS
+ ~/lib/
+ /usr/lib64
+ /usr/lib
+ /usr/local/lib64
+ /usr/local/lib
+ /sw/lib
+ /opt/local/lib
+ 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")
+ENDIF(GBE_INCLUDE_PATH)
+
+MARK_AS_ADVANCED(GBE_FOUND)
+