aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2018-08-02 21:17:19 -0700
committerGitHub <noreply@github.com>2018-08-02 21:17:19 -0700
commit1012f78d8fbd3dd5292769ffaee91803377fa77d (patch)
tree2e25c8feed31a1079838a45547e69a63452424af /cmake
parentca8e0108d483f510bc3fa58acfc8627c7ac6b019 (diff)
parentb894d4b561a63610b74c5e98cbe7e2c337d25a90 (diff)
Merge pull request #14097 from lrusak/drm-modifiers
[linux] windowing/gbm: add drm modifiers
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