[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/17] meson: skip SDL2 detection if --disable-system
From: |
Paolo Bonzini |
Subject: |
[PULL 09/17] meson: skip SDL2 detection if --disable-system |
Date: |
Thu, 27 Aug 2020 12:59:48 -0400 |
SDL is only used for system emulation; avoid spurious warnings for
static --disable-system emulation by skipping the detection of
the library if there are no system emulation targets.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/meson.build b/meson.build
index 86a6d13192..a3baa2dbf0 100644
--- a/meson.build
+++ b/meson.build
@@ -20,6 +20,16 @@ build_docs = 'BUILD_DOCS' in config_host
config_host_data = configuration_data()
genh = []
+target_dirs = config_host['TARGET_DIRS'].split()
+have_user = false
+have_system = false
+foreach target : target_dirs
+ have_user = have_user or target.endswith('-user')
+ have_system = have_system or target.endswith('-softmmu')
+endforeach
+have_tools = 'CONFIG_TOOLS' in config_host
+have_block = have_system or have_tools
+
add_project_arguments(config_host['QEMU_CFLAGS'].split(),
native: false, language: ['c', 'objc'])
add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
@@ -227,9 +237,12 @@ if 'CONFIG_BRLAPI' in config_host
brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split())
endif
-sdl = dependency('sdl2', required: get_option('sdl'), static: enable_static,
- include_type: 'system')
-sdl_image = not_found
+sdl = not_found
+if have_system
+ sdl = dependency('sdl2', required: get_option('sdl'), static: enable_static,
+ include_type: 'system')
+ sdl_image = not_found
+endif
if sdl.found()
# work around 2.0.8 bug
sdl = declare_dependency(compile_args: '-Wno-undef',
@@ -426,9 +439,6 @@ endforeach
genh += configure_file(output: 'config-host.h', configuration:
config_host_data)
minikconf = find_program('scripts/minikconf.py')
-target_dirs = config_host['TARGET_DIRS'].split()
-have_user = false
-have_system = false
config_devices_mak_list = []
config_devices_h = {}
config_target_h = {}
@@ -449,7 +459,6 @@ kconfig_external_symbols = [
]
ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
foreach target : target_dirs
- have_user = have_user or target.endswith('-user')
config_target = keyval.load(meson.current_build_dir() / target /
'config-target.mak')
config_target_data = configuration_data()
@@ -472,8 +481,6 @@ foreach target : target_dirs
configuration:
config_target_data)}
if target.endswith('-softmmu')
- have_system = true
-
base_kconfig = []
foreach sym : kconfig_external_symbols
if sym in config_target or sym in config_host
@@ -503,8 +510,6 @@ foreach target : target_dirs
endif
config_target_mak += {target: config_target}
endforeach
-have_tools = 'CONFIG_TOOLS' in config_host
-have_block = have_system or have_tools
grepy = find_program('scripts/grepy.sh')
# This configuration is used to build files that are shared by
--
2.26.2
- Re: [PULL 02/17] meson: Build qemu-nbd on macOS again, (continued)
[PULL 03/17] meson: Don't make object files for dtrace on macOS, Paolo Bonzini, 2020/08/27
[PULL 04/17] scripts/qemu-version.sh: Add missing space before ']', Paolo Bonzini, 2020/08/27
[PULL 08/17] meson: move pixman detection to meson, Paolo Bonzini, 2020/08/27
[PULL 10/17] configure: add --ninja option, Paolo Bonzini, 2020/08/27
[PULL 11/17] meson: cleanup xkbcommon detection, Paolo Bonzini, 2020/08/27
[PULL 06/17] meson: Fix chardev-baum.so name, Paolo Bonzini, 2020/08/27
[PULL 05/17] meson: Fix meson build with --enable-libdaxctl, Paolo Bonzini, 2020/08/27
[PULL 09/17] meson: skip SDL2 detection if --disable-system,
Paolo Bonzini <=
[PULL 16/17] meson: set colorout to auto, Paolo Bonzini, 2020/08/27
[PULL 15/17] meson: Mingw64 gcc doesn't recognize system include_type for sdl2, Paolo Bonzini, 2020/08/27
[PULL 13/17] ninjatool: quote dollars in variables, Paolo Bonzini, 2020/08/27
[PULL 07/17] configure: default to PIE disabled on Windows platforms, Paolo Bonzini, 2020/08/27
[PULL 14/17] meson: fix relpath failure on Win32, Paolo Bonzini, 2020/08/27
[PULL 12/17] meson: don't require CONFIG_VTE for the GTK UI, Paolo Bonzini, 2020/08/27
[PULL 17/17] ninjatool: Fixes E$$: in generated Makefile.ninja, Paolo Bonzini, 2020/08/27
Re: [PULL 00/17] Meson fixes for 2020-08-27, Peter Maydell, 2020/08/28