summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2014-04-10 18:09:44 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-04-17 10:04:36 +0800
commitcecd52124bfd7c79108e36cae549354b16c2ef4e (patch)
tree8b2bae2b7500e393edd8640671b96bed45bb4f2a /CMake
parent94ee7a3de83c2471a09be83bc860ce3763ce73a2 (diff)
Use pkg-config to check modules
Instead of use pre-defined path for dependent modules, e.g libdrm, libdrm_intel, etc. Use pkg-config helper for cmake instead. This makes it easy to work with developer own built version of those dependences. Also remove libGL dependence for 'gbe_bin_generator' which is not required. libutest.so still requires libGL now but might be fixed by checking real GL dependence. v2: Fix build with mesa source (92e6260) and link required EGL lib with utests too. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Reviewed-by:Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'CMake')
-rw-r--r--CMake/FindDRM.cmake42
-rw-r--r--CMake/FindDRMIntel.cmake43
-rw-r--r--CMake/FindMesaSrc.cmake (renamed from CMake/FindEGL.cmake)35
-rw-r--r--CMake/FindXext.cmake35
-rw-r--r--CMake/FindXfixes.cmake35
5 files changed, 3 insertions, 187 deletions
diff --git a/CMake/FindDRM.cmake b/CMake/FindDRM.cmake
deleted file mode 100644
index a5a4ebc0..00000000
--- a/CMake/FindDRM.cmake
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Try to find X library and include path.
-# Once done this will define
-#
-# DRM_FOUND
-# DRM_INCLUDE_PATH
-# DRM_LIBRARY
-#
-
-FIND_PATH(DRM_INCLUDE_PATH
- NAMES
- drm.h
- PATHS
- ${CMAKE_INCLUDE_PATH}/include/libdrm/
- ~/include/libdrm/
- /usr/include/libdrm/
- /usr/local/include/libdrm/
- /sw/include/libdrm/
- /opt/local/include/libdrm/
- DOC "The directory where drm.h resides")
-FIND_LIBRARY(DRM_LIBRARY
- NAMES DRM drm
- PATHS
- ${CMAKE_LIBRARY_PATH}/lib/
- ~/lib/
- /usr/lib64
- /usr/lib
- /usr/local/lib64
- /usr/local/lib
- /sw/lib
- /opt/local/lib
- 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")
-ENDIF(DRM_INCLUDE_PATH)
-
-MARK_AS_ADVANCED(DRM_FOUND)
-
diff --git a/CMake/FindDRMIntel.cmake b/CMake/FindDRMIntel.cmake
deleted file mode 100644
index 0aab1c79..00000000
--- a/CMake/FindDRMIntel.cmake
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Try to find X library and include path.
-# Once done this will define
-#
-# DRM_INTEL_FOUND
-# DRM_INTEL_INCLUDE_PATH
-#
-
-FIND_PATH(DRM_INTEL_INCLUDE_PATH
- NAMES
- intel_bufmgr.h
- PATHS
- ${CMAKE_INCLUDE_PATH}/include/libdrm/
- ~/include/libdrm/
- /usr/include/libdrm/
- /usr/local/include/libdrm/
- /sw/include/libdrm/
- /opt/local/include/libdrm/
- DOC "The directory where intel_bufmgr.h resides")
-
-FIND_LIBRARY(DRM_INTEL_LIBRARY
- NAMES DRM_INTEL drm_intel
- PATHS
- ${CMAKE_LIBRARY_PATH}/lib/
- ~/lib/
- /usr/lib64
- /usr/lib
- /usr/local/lib64
- /usr/local/lib
- /sw/lib
- /opt/local/lib
- /usr/lib/i386-linux-gnu/
- 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")
-ENDIF(DRM_INTEL_INCLUDE_PATH)
-
-MARK_AS_ADVANCED(DRM_INTEL_FOUND)
-
diff --git a/CMake/FindEGL.cmake b/CMake/FindMesaSrc.cmake
index 597b4a57..c1d4fc62 100644
--- a/CMake/FindEGL.cmake
+++ b/CMake/FindMesaSrc.cmake
@@ -1,38 +1,11 @@
#
-# Try to find EGL library and include path.
+# Try to find mesa source code
# Once done this will define
#
-# EGL_FOUND
-# EGL_INCLUDE_PATH
-# EGL_LIBRARY
+# MESA_SOURCE_FOUND
+# MESA_SOURCE_INCLUDES
#
-FIND_PATH(EGL_INCLUDE_PATH EGL/egl.h
- ~/include/
- /usr/include/
- /usr/local/include/
- /sw/include/
- /opt/local/include/
- DOC "The directory where gen/program.h resides")
-FIND_LIBRARY(EGL_LIBRARY
- NAMES EGL egl
- PATHS
- ~/lib/
- /usr/lib64
- /usr/lib
- /usr/local/lib64
- /usr/local/lib
- /sw/lib
- /opt/local/lib
- 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")
-ENDIF(EGL_INCLUDE_PATH)
-
# Find mesa source code.
FIND_PATH(MESA_SOURCE_PREFIX src/mesa/main/texobj.c
$ENV{MESA_SOURCE_DIR}
@@ -51,5 +24,3 @@ SET(MESA_SOURCE_FOUND 1 CACHE STRING "Set to 1 if mesa source code is found, 0 o
ELSE(MESA_SOURCE_PREFIX)
SET(MESA_SOURCE_FOUND 0 CACHE STRING "Set to 1 if mesa source code is found, 0 otherwise")
ENDIF(MESA_SOURCE_PREFIX)
-
-MARK_AS_ADVANCED(EGL_FOUND)
diff --git a/CMake/FindXext.cmake b/CMake/FindXext.cmake
deleted file mode 100644
index 5bbd7196..00000000
--- a/CMake/FindXext.cmake
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Try to find Xext library path.
-# Once done this will define
-#
-# XEXT_FOUND
-# XEXT_LIBRARY
-#
-
-FIND_PATH(XEXT_INCLUDE_PATH X11/extensions/Xext.h
- /usr/include
- /usr/local/include
- /sw/include
- /opt/local/include
- DOC "The directory where Xext.h resides")
-
-FIND_LIBRARY(XEXT_LIBRARY
- NAMES XEXT Xext
- PATHS
- /usr/lib64
- /usr/lib
- /usr/local/lib64
- /usr/local/lib
- /sw/lib
- /opt/local/lib
- 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")
-ENDIF(XEXT_INCLUDE_PATH)
-
-MARK_AS_ADVANCED(XEXT_FOUND)
-
diff --git a/CMake/FindXfixes.cmake b/CMake/FindXfixes.cmake
deleted file mode 100644
index 47259e1b..00000000
--- a/CMake/FindXfixes.cmake
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Try to find Xfixes library path.
-# Once done this will define
-#
-# XFIXES_FOUND
-# XFIXES_LIBRARY
-#
-
-FIND_PATH(XFIXES_INCLUDE_PATH X11/extensions/Xfixes.h
- /usr/include
- /usr/local/include
- /sw/include
- /opt/local/include
- DOC "The directory where Xfixes.h resides")
-
-FIND_LIBRARY(XFIXES_LIBRARY
- NAMES XFIXES Xfixes
- PATHS
- /usr/lib64
- /usr/lib
- /usr/local/lib64
- /usr/local/lib
- /sw/lib
- /opt/local/lib
- 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")
-ENDIF(XFIXES_INCLUDE_PATH)
-
-MARK_AS_ADVANCED(XFIXES_FOUND)
-