]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: move declarations of portabled and friends
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 25 Jun 2023 06:48:28 +0000 (15:48 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 31 Jul 2023 20:52:50 +0000 (05:52 +0900)
meson.build
src/portable/meson.build

index 27166ed58a43ac4832b3648d4c393e296acf1d9c..b22a24821e00b52463a106655f795b92c2c6134f 100644 (file)
@@ -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',
index 3a151d498ef530c9faf2c7ddf803cb20af712209..210829b851456e7e0f13a26d09da2413d0a52704 100644 (file)
@@ -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)