aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2021-07-13 13:09:02 +0200
committerThomas Huth <thuth@redhat.com>2021-09-06 10:00:14 +0200
commit8bc5184d23c2f95727021844895a24c0579928b2 (patch)
tree91500cd626cebd5dad33794410917cb1461e0fb4 /meson.build
parent6c22853c733efd0a3d243bab48f8af66588f4a7a (diff)
configure / meson: Move the GBM handling to meson.build
The GBM library detection does not need to be in the configure script, since it does not have any user-facing options (there are no --enable-gbm or --disable-gbm switches). Let's move it to meson.build instead, so we don't have to clutter config-host.mak with the related switches. Additionally, only check for GBM if it is really required, i.e. if we either compile with OpenGL or with virglrenderer support. Message-Id: <20210714085045.797168-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 8 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index ecfdce921c..7e58e6279b 100644
--- a/meson.build
+++ b/meson.build
@@ -472,11 +472,6 @@ if not get_option('zstd').auto() or have_block
required: get_option('zstd'),
method: 'pkg-config', kwargs: static_kwargs)
endif
-gbm = not_found
-if 'CONFIG_GBM' in config_host
- gbm = declare_dependency(compile_args: config_host['GBM_CFLAGS'].split(),
- link_args: config_host['GBM_LIBS'].split())
-endif
virgl = not_found
if not get_option('virglrenderer').auto() or have_system
virgl = dependency('virglrenderer',
@@ -816,11 +811,17 @@ coreaudio = not_found
if 'CONFIG_AUDIO_COREAUDIO' in config_host
coreaudio = declare_dependency(link_args: config_host['COREAUDIO_LIBS'].split())
endif
+
opengl = not_found
if 'CONFIG_OPENGL' in config_host
opengl = declare_dependency(compile_args: config_host['OPENGL_CFLAGS'].split(),
link_args: config_host['OPENGL_LIBS'].split())
endif
+gbm = not_found
+if (have_system or have_tools) and (virgl.found() or opengl.found())
+ gbm = dependency('gbm', method: 'pkg-config', required: false,
+ kwargs: static_kwargs)
+endif
gnutls = not_found
gnutls_crypto = not_found
@@ -1244,6 +1245,7 @@ config_host_data.set('CONFIG_MPATH', mpathpersist.found())
config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api)
config_host_data.set('CONFIG_CURL', curl.found())
config_host_data.set('CONFIG_CURSES', curses.found())
+config_host_data.set('CONFIG_GBM', gbm.found())
config_host_data.set('CONFIG_GLUSTERFS', glusterfs.found())
if glusterfs.found()
config_host_data.set('CONFIG_GLUSTERFS_XLATOR_OPT', glusterfs.version().version_compare('>=4'))
@@ -3086,7 +3088,7 @@ summary_info += {'U2F support': u2f.found()}
summary_info += {'libusb': libusb.found()}
summary_info += {'usb net redir': usbredir.found()}
summary_info += {'OpenGL support': config_host.has_key('CONFIG_OPENGL')}
-summary_info += {'GBM': config_host.has_key('CONFIG_GBM')}
+summary_info += {'GBM': gbm.found()}
summary_info += {'libiscsi support': libiscsi.found()}
summary_info += {'libnfs support': libnfs.found()}
if targetos == 'windows'