aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindGBM.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/modules/FindGBM.cmake b/cmake/modules/FindGBM.cmake
index 18df89e1a4..37a26a7bc4 100644
--- a/cmake/modules/FindGBM.cmake
+++ b/cmake/modules/FindGBM.cmake
@@ -39,6 +39,14 @@ check_c_source_compiles("#include <gbm.h>
}
" GBM_HAS_BO_MAP)
+check_c_source_compiles("#include <gbm.h>
+
+ int main()
+ {
+ gbm_surface_create_with_modifiers(NULL, 0, 0, 0, NULL, 0);
+ }
+ " GBM_HAS_MODIFIERS)
+
if(GBM_FOUND)
set(GBM_LIBRARIES ${GBM_LIBRARY})
set(GBM_INCLUDE_DIRS ${GBM_INCLUDE_DIR})
@@ -46,6 +54,9 @@ if(GBM_FOUND)
if(GBM_HAS_BO_MAP)
list(APPEND GBM_DEFINITIONS -DHAS_GBM_BO_MAP=1)
endif()
+ if(GBM_HAS_MODIFIERS)
+ list(APPEND GBM_DEFINITIONS -DHAS_GBM_MODIFIERS=1)
+ endif()
if(NOT TARGET GBM::GBM)
add_library(GBM::GBM UNKNOWN IMPORTED)
set_target_properties(GBM::GBM PROPERTIES