From: Yu Watanabe Date: Sun, 25 Jun 2023 06:48:28 +0000 (+0900) Subject: meson: move declarations of portabled and friends X-Git-Tag: v255-rc1~861^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f1d95540ef65154b7d6645dd0cacd7236cb1d075;p=thirdparty%2Fsystemd.git meson: move declarations of portabled and friends --- diff --git a/meson.build b/meson.build index 27166ed58a4..b22a24821e0 100644 --- a/meson.build +++ b/meson.build @@ -2570,37 +2570,6 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('ENABLE_BOOTLOADER') == 1 endif endif -if conf.get('ENABLE_PORTABLED') == 1 - if get_option('link-portabled-shared') - portabled_link_with = [libshared] - else - portabled_link_with = [libsystemd_static, - libshared_static] - endif - - dbus_programs += executable( - 'systemd-portabled', - systemd_portabled_sources, - include_directories : includes, - link_with : [portabled_link_with], - dependencies : [libselinux, - threads, - userspace], - install_rpath : pkglibdir, - install : true, - install_dir : libexecdir) - - public_programs += executable( - 'portablectl', - 'src/portable/portablectl.c', - include_directories : includes, - link_with : [portabled_link_with], - dependencies : [threads, - userspace], - install_rpath : pkglibdir, - install : true) -endif - if conf.get('ENABLE_SYSEXT') == 1 public_programs += executable( 'systemd-sysext', diff --git a/src/portable/meson.build b/src/portable/meson.build index 3a151d498ef..210829b8514 100644 --- a/src/portable/meson.build +++ b/src/portable/meson.build @@ -9,6 +9,37 @@ systemd_portabled_sources = files( 'portabled.c', ) +if get_option('link-portabled-shared') + portabled_link_with = [libshared] +else + portabled_link_with = [ + libshared_static, + libsystemd_static, + ] +endif + +executables += [ + libexec_template + { + 'name' : 'systemd-portabled', + 'dbus' : true, + 'conditions' : ['ENABLE_PORTABLED'], + 'sources' : systemd_portabled_sources, + 'link_with' : portabled_link_with, + 'dependencies' : [ + libselinux, + threads, + ], + }, + executable_template + { + 'name' : 'portablectl', + 'public' : true, + 'conditions' : ['ENABLE_PORTABLED'], + 'sources' : files('portablectl.c'), + 'link_with' : portabled_link_with, + 'dependencies' : threads, + }, +] + if conf.get('ENABLE_PORTABLED') == 1 install_data('org.freedesktop.portable1.conf', install_dir : dbuspolicydir)