Skip to content

Commit 75c3888

Browse files
committed
meson: Add more GBM versions
The newer DDK might provide newer API versions. Change-Id: I4f8188173c356bc6a57d0f002d8f0ec7fbb5b311 Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
1 parent 57c2a4e commit 75c3888

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

meson.build

+13-5
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,20 @@ cl_headers = {
120120
'include/CL' : 'CL',
121121
}
122122

123+
# Load original mali library for later function checks and linking
124+
mali = cc.find_library(fs.stem(default_lib),
125+
dirs : meson.current_source_dir() / fs.parent(default_lib))
126+
123127
# Provide newer GBM version with hook library
124-
gbm_version = hooks_opts ? '21.2.6' : '10.4.0'
128+
if hooks_opts
129+
gbm_version = '21.2.6'
130+
elif cc.has_function('gbm_bo_get_fd_for_plane', dependencies : mali)
131+
gbm_version = '21.1.0'
132+
elif cc.has_function('gbm_bo_get_modifier', dependencies : mali)
133+
gbm_version = '17.1.0'
134+
else
135+
gbm_version = '10.4.0'
136+
endif
125137

126138
# Package name : required symbol, wrappers, headers, package version
127139
map = {
@@ -133,10 +145,6 @@ map = {
133145
'OpenCL' : ['clCreateContext', cl_wrappers, cl_headers, '1.2'],
134146
}
135147

136-
# Load original mali library for later function checks and linking
137-
mali = cc.find_library(fs.stem(default_lib),
138-
dirs : meson.current_source_dir() / fs.parent(default_lib))
139-
140148
libhook = []
141149
if hooks_opts
142150
# Build hook library

0 commit comments

Comments
 (0)