diff options
author | Daniel Kurtz <djkurtz@chromium.org> | 2014-01-15 19:10:03 +0800 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2014-01-19 12:06:16 -0800 |
commit | fc64c93fe82829af89df86e891401c20761cab9e (patch) | |
tree | 9863381c1bf67bbb297512d9bb72a0ddbef9b42d /CMakeLists.txt | |
parent | 00a8b9051654ec339a569d6355f2ce270f84e725 (diff) |
cmake: Only set HAS_GBM if pkgconfig finds gbm
[chadv] Tested on systems with and without GBM.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Tested-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 74a95a97a..717818102 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,8 +112,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) set(PIGLIT_HAS_GLX True) add_definitions(-DPIGLIT_HAS_GLX) |