[Piglit] [PATCH 08/10] CMakeLists: Only set HAS_GBM if pkgconfig finds gbm
Daniel Kurtz
djkurtz at chromium.org
Wed Jan 15 03:10:03 PST 2014
This looks right to me, but I don't have a GBM system to test with.
Signed-off-by: Daniel Kurtz <djkurtz at chromium.org>
---
CMakeLists.txt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 913a29d..fc5b475 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -98,8 +98,11 @@ if(PIGLIT_BUILD_CL_TESTS)
endif(PIGLIT_BUILD_CL_TESTS)
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- set(PIGLIT_HAS_GBM True)
- add_definitions(-DPIGLIT_HAS_GBM)
+ pkg_check_modules(GBM QUIET gbm)
+ if(GBM_FOUND)
+ set(PIGLIT_HAS_GBM True)
+ add_definitions(-DPIGLIT_HAS_GBM)
+ endif(GBM_FOUND)
pkg_check_modules(LIBDRM QUIET libdrm)
pkg_check_modules(LIBDRM_INTEL QUIET libdrm_intel)
--
1.8.5.2
More information about the Piglit
mailing list