cmake,meson: Set minimum glib version to 2.72

This version is required for glib-based tests with AF_UNIX support
under Windows.

As dbus is at the beginning of a new development branch and 2.72
is quite old (2022), the minimum version has been unconditionally
raised.
This commit is contained in:
Ralf Habacker 2023-01-30 13:10:07 +01:00
parent cac337cc76
commit 0c1b525c88
2 changed files with 4 additions and 2 deletions

View file

@ -182,7 +182,8 @@ endif()
find_package(EXPAT)
find_package(X11)
find_package(GLIB2)
set(GLIB_MIN_VERSION 2.72) # for AF_UNIX
find_package(GLIB2 ${GLIB_MIN_VERSION})
if(GLIB2_FOUND)
option(DBUS_WITH_GLIB "build with glib" ON)
endif()

View file

@ -397,11 +397,12 @@ endif
# a running dbus-daemon will be disabled if message_bus is not set.
message_bus = get_option('message_bus')
minimum_glib = '2.72' # for AF_UNIX
if get_option('modular_tests').disabled()
glib = dependency('', required: false)
else
glib = dependency(
'glib-2.0', version: '>=2.40',
'glib-2.0', version: '>=' + minimum_glib,
required: get_option('modular_tests'),
fallback: ['glib', 'libglib_dep'],
default_options: fallback_subproject_options + [