diff --git a/meson_options.txt b/meson_options.txt index ee30d721bc7..94904d16282 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -27,6 +27,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, diff --git a/src/busctl/meson.build b/src/busctl/meson.build index 6b3a479b219..6d94e2925b8 100644 --- a/src/busctl/meson.build +++ b/src/busctl/meson.build @@ -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(