mirror of
https://github.com/systemd/systemd
synced 2024-07-21 02:05:05 +00:00
meson: Convert dbus to meson feature
Also, there is no need to conditionalize the get_variable() calls because not-found dependencies will just return the passed default value if provided.
This commit is contained in:
parent
a0c9ac9ae4
commit
101b59433b
35
meson.build
35
meson.build
|
@ -1448,22 +1448,12 @@ libgio = dependency('gio-2.0',
|
||||||
required : get_option('glib'))
|
required : get_option('glib'))
|
||||||
conf.set10('HAVE_GLIB', libglib.found() and libgobject.found() and libgio.found())
|
conf.set10('HAVE_GLIB', libglib.found() and libgobject.found() and libgio.found())
|
||||||
|
|
||||||
want_dbus = get_option('dbus')
|
libdbus = dependency('dbus-1',
|
||||||
if want_dbus != 'false' and not skip_deps
|
version : '>= 1.3.2',
|
||||||
libdbus = dependency('dbus-1',
|
required : get_option('dbus'))
|
||||||
version : '>= 1.3.2',
|
conf.set10('HAVE_DBUS', libdbus.found())
|
||||||
required : want_dbus == 'true')
|
|
||||||
have = libdbus.found()
|
|
||||||
else
|
|
||||||
have = false
|
|
||||||
libdbus = []
|
|
||||||
endif
|
|
||||||
conf.set10('HAVE_DBUS', have)
|
|
||||||
|
|
||||||
dbusdatadir = datadir / 'dbus-1'
|
dbusdatadir = libdbus.get_variable(pkgconfig: 'datadir', default_value: datadir) / 'dbus-1'
|
||||||
if conf.get('HAVE_DBUS') == 1
|
|
||||||
dbusdatadir = libdbus.get_variable(pkgconfig: 'datadir', default_value: datadir) / 'dbus-1'
|
|
||||||
endif
|
|
||||||
|
|
||||||
dbuspolicydir = get_option('dbuspolicydir')
|
dbuspolicydir = get_option('dbuspolicydir')
|
||||||
if dbuspolicydir == ''
|
if dbuspolicydir == ''
|
||||||
|
@ -1472,18 +1462,12 @@ endif
|
||||||
|
|
||||||
dbussessionservicedir = get_option('dbussessionservicedir')
|
dbussessionservicedir = get_option('dbussessionservicedir')
|
||||||
if dbussessionservicedir == ''
|
if dbussessionservicedir == ''
|
||||||
dbussessionservicedir = dbusdatadir / 'services'
|
dbussessionservicedir = libdbus.get_variable(pkgconfig: 'session_bus_services_dir', default_value: dbusdatadir / 'services')
|
||||||
if conf.get('HAVE_DBUS') == 1
|
|
||||||
dbussessionservicedir = libdbus.get_variable(pkgconfig: 'session_bus_services_dir', default_value: dbussessionservicedir)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dbussystemservicedir = get_option('dbussystemservicedir')
|
dbussystemservicedir = get_option('dbussystemservicedir')
|
||||||
if dbussystemservicedir == ''
|
if dbussystemservicedir == ''
|
||||||
dbussystemservicedir = dbusdatadir / 'system-services'
|
dbussystemservicedir = libdbus.get_variable(pkgconfig: 'system_bus_services_dir', default_value: dbusdatadir / 'system-services')
|
||||||
if conf.get('HAVE_DBUS') == 1
|
|
||||||
dbussystemservicedir = libdbus.get_variable(pkgconfig: 'system_bus_services_dir', default_value: dbussystemservicedir)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dbus_interfaces_dir = get_option('dbus-interfaces-dir')
|
dbus_interfaces_dir = get_option('dbus-interfaces-dir')
|
||||||
|
@ -1492,10 +1476,7 @@ if dbus_interfaces_dir == '' or dbus_interfaces_dir == 'yes'
|
||||||
dbus_interfaces_dir = 'no'
|
dbus_interfaces_dir = 'no'
|
||||||
warning('Exporting D-Bus interface XML files is disabled during cross build. Pass path or "yes" to force enable.')
|
warning('Exporting D-Bus interface XML files is disabled during cross build. Pass path or "yes" to force enable.')
|
||||||
else
|
else
|
||||||
dbus_interfaces_dir = dbusdatadir / 'interfaces'
|
dbus_interfaces_dir = libdbus.get_variable(pkgconfig: 'interfaces_dir', default_value: dbusdatadir / 'interfaces')
|
||||||
if conf.get('HAVE_DBUS') == 1
|
|
||||||
dbus_interfaces_dir = libdbus.get_variable(pkgconfig: 'interfaces_dir', default_value: dbus_interfaces_dir)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -437,7 +437,7 @@ option('pcre2', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : '
|
||||||
description : 'regexp matching support using pcre2')
|
description : 'regexp matching support using pcre2')
|
||||||
option('glib', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
option('glib', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'libglib support (for tests only)')
|
description : 'libglib support (for tests only)')
|
||||||
option('dbus', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('dbus', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||||
description : 'libdbus support (for tests only)')
|
description : 'libdbus support (for tests only)')
|
||||||
|
|
||||||
option('bootloader', type : 'combo', choices : ['auto', 'true', 'false'],
|
option('bootloader', type : 'combo', choices : ['auto', 'true', 'false'],
|
||||||
|
|
|
@ -142,7 +142,7 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
|
||||||
-D xkbcommon=enabled
|
-D xkbcommon=enabled
|
||||||
-D pcre2=enabled
|
-D pcre2=enabled
|
||||||
-D glib=enabled
|
-D glib=enabled
|
||||||
-D dbus=true
|
-D dbus=enabled
|
||||||
-D bootloader=true
|
-D bootloader=true
|
||||||
-D kernel-install=true
|
-D kernel-install=true
|
||||||
-D analyze=true
|
-D analyze=true
|
||||||
|
|
Loading…
Reference in a new issue