1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-21 02:50:18 +03:00

meson: allow linking busctl statically

When cross compiling we may want to build a host busctl statically
so that we don't have to deal with shared library issues.
This commit is contained in:
James Hilliard 2024-09-10 14:02:51 -06:00
parent 408ab988db
commit e95944cc22
2 changed files with 10 additions and 0 deletions

View File

@ -33,6 +33,8 @@ option('link-journalctl-shared', type: 'boolean',
description : 'link journalctl against libsystemd-shared.so')
option('link-boot-shared', type: 'boolean',
description : 'link bootctl and systemd-bless-boot against libsystemd-shared.so')
option('link-busctl-shared', type: 'boolean',
description : 'link busctl against libsystemd-shared.so')
option('link-portabled-shared', type: 'boolean',
description : 'link systemd-portabled and its helpers to libsystemd-shared.so')
option('first-boot-full-preset', type: 'boolean', value: false,

View File

@ -5,11 +5,19 @@ busctl_sources = files(
'busctl.c',
)
if get_option('link-busctl-shared')
busctl_link_with = [libshared]
else
busctl_link_with = [libsystemd_static,
libshared_static]
endif
executables += [
executable_template + {
'name' : 'busctl',
'public' : true,
'sources' : busctl_sources,
'link_with' : busctl_link_with,
},
test_template + {
'sources' : files(