diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-08-26 08:22:58 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-08-27 18:52:30 +0200 |
commit | b7612f45da9ea3ff3488a34f2ffd39d0d94713fb (patch) | |
tree | 6f26a9ca4db19e6342bc62553f1ab33561479b90 /meson.build | |
parent | fb648e9cacf4209ddaa8ee67d1a87a9b78a001c6 (diff) |
meson: move pixman detection to meson
When pixman is not installed (or too old), but virglrenderer is available
and "configure" has been run with "--disable-system", the build currently
aborts when trying to compile vhost-user-gpu (since it requires pixman).
Let's skip the build of vhost-user-gpu when pixman is not installed or
too old. Instead of adding CONFIG_PIXMAN, it is simpler to move the
detection to pixman.
Based on a patch by Thomas Huth. <thuth@redhat.com>
Fixes: 9b52b17ba5 ("configure: Allow to build tools without pixman")
Reported-by: Rafael Kitover <rkitover@gmail.com>
Reported-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/meson.build b/meson.build index b44901dfe1..86a6d13192 100644 --- a/meson.build +++ b/meson.build @@ -113,8 +113,11 @@ if 'CONFIG_GNUTLS' in config_host gnutls = declare_dependency(compile_args: config_host['GNUTLS_CFLAGS'].split(), link_args: config_host['GNUTLS_LIBS'].split()) endif -pixman = declare_dependency(compile_args: config_host['PIXMAN_CFLAGS'].split(), - link_args: config_host['PIXMAN_LIBS'].split()) +pixman = not_found +if have_system or have_tools + pixman = dependency('pixman-1', required: have_system, version:'>=0.21.8', + static: enable_static) +endif pam = not_found if 'CONFIG_AUTH_PAM' in config_host pam = cc.find_library('pam') @@ -981,6 +984,7 @@ foreach target : target_dirs lib = static_library('qemu-' + target, sources: arch_srcs + genh, + dependencies: arch_deps, objects: objects, include_directories: target_inc, c_args: c_args, @@ -1102,9 +1106,7 @@ if have_tools if 'CONFIG_VHOST_USER' in config_host subdir('contrib/libvhost-user') subdir('contrib/vhost-user-blk') - if 'CONFIG_LINUX' in config_host - subdir('contrib/vhost-user-gpu') - endif + subdir('contrib/vhost-user-gpu') subdir('contrib/vhost-user-input') subdir('contrib/vhost-user-scsi') endif @@ -1285,6 +1287,7 @@ summary_info += {'SDL image support': sdl_image.found()} # TODO: add back version summary_info += {'GTK support': config_host.has_key('CONFIG_GTK')} summary_info += {'GTK GL support': config_host.has_key('CONFIG_GTK_GL')} +summary_info += {'pixman': pixman.found()} # TODO: add back version summary_info += {'VTE support': config_host.has_key('CONFIG_VTE')} summary_info += {'TLS priority': config_host['CONFIG_TLS_PRIORITY']} |