From e6e8072cd92e3f605940275e8a57404c4458dd85 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Sat, 10 Jun 2017 14:31:55 +0200 Subject: [PATCH] cmake: Reintroduce version check to gbm_bo_map check Fixes: 2217871ac937 ("CMake: define GBM_BO_MAP only when symbol is found") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101358 Signed-off-by: Jan Vesely --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc26fa8be..b4dfe4fcf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,9 +142,11 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(PIGLIT_HAS_GBM True) add_definitions(-DPIGLIT_HAS_GBM) set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GBM_LIBRARIES}) - CHECK_FUNCTION_EXISTS(gbm_bo_map PIGLIT_HAS_GBM_BO_MAP) - if (PIGLIT_HAS_GBM_BO_MAP) - add_definitions(-DPIGLIT_HAS_GBM_BO_MAP) + if (GBM_VERSION VERSION_EQUAL "12.1" OR GBM_VERSION VERSION_GREATER "12.1") + CHECK_FUNCTION_EXISTS(gbm_bo_map PIGLIT_HAS_GBM_BO_MAP) + if (PIGLIT_HAS_GBM_BO_MAP) + add_definitions(-DPIGLIT_HAS_GBM_BO_MAP) + endif() endif() endif(GBM_FOUND) -- 2.13.0