Merge branch 'subprojects' into 'main'

build: Improve options used for fallback Meson subprojects

See merge request dbus/dbus!516
This commit is contained in:
Simon McVittie 2025-02-28 14:36:56 +00:00
commit c6780cbd31

View file

@ -364,6 +364,16 @@ config.set(
and cc.has_header_symbol('time.h', 'clock_getres', args: compile_args_c),
)
fallback_subproject_options = [
'werror=false',
]
if cc.get_id() != 'msvc'
# TODO: Ideally we'd have default_library=static with MSVC too,
# but see https://gitlab.freedesktop.org/dbus/dbus/-/issues/549
fallback_subproject_options += ['default_library=static']
endif
# Controls whether message bus daemon is built. Tests which depend on
# a running dbus-daemon will be disabled if message_bus is not set.
message_bus = get_option('message_bus')
@ -375,8 +385,9 @@ else
'glib-2.0', version: '>=2.40',
required: get_option('modular_tests'),
fallback: ['glib', 'libglib_dep'],
default_options: [
'tests=false',
default_options: fallback_subproject_options + [
'introspection=disabled',
'tests=false',
],
)
endif
@ -396,7 +407,12 @@ endif
use_glib = glib.found() and gio.found()
if message_bus
expat = dependency('expat')
expat = dependency(
'expat',
default_options: fallback_subproject_options + [
'build_tests=false',
],
)
else
expat = dependency('', required: false)
endif