]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: add static libs to libudev/libsystemd target aliases
authorLuca Boccassi <bluca@debian.org>
Fri, 31 May 2024 20:44:43 +0000 (21:44 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 31 May 2024 22:38:26 +0000 (00:38 +0200)
If static libraries are enabled, then group them in the build target together
with the shared libraries, to match the install tags.

meson.build

index ea37dda854d4b2cab12f254eaf89142675f80166..b0b8697d5029a81ad550c6bda25dd3f2fb1a987d 100644 (file)
@@ -2084,8 +2084,6 @@ libsystemd = shared_library(
         install_tag: 'libsystemd',
         install_dir : libdir)
 
-alias_target('libsystemd', libsystemd)
-
 install_libsystemd_static = static_library(
         'systemd',
         libsystemd_sources,
@@ -2111,6 +2109,12 @@ install_libsystemd_static = static_library(
                         userspace],
         c_args : libsystemd_c_args + (static_libsystemd_pic ? [] : ['-fno-PIC']))
 
+if static_libsystemd != 'false'
+        alias_target('libsystemd', libsystemd, install_libsystemd_static)
+else
+        alias_target('libsystemd', libsystemd)
+endif
+
 libudev = shared_library(
         'udev',
         version : libudev_version,
@@ -2126,8 +2130,6 @@ libudev = shared_library(
         install_tag: 'libudev',
         install_dir : libdir)
 
-alias_target('libudev', libudev)
-
 install_libudev_static = static_library(
         'udev',
         basic_sources,
@@ -2147,6 +2149,12 @@ install_libudev_static = static_library(
         c_args : static_libudev_pic ? [] : ['-fno-PIC'],
         pic : static_libudev_pic)
 
+if static_libudev != 'false'
+        alias_target('libudev', libudev, install_libudev_static)
+else
+        alias_target('libudev', libudev)
+endif
+
 #####################################################################
 
 runtest_env = custom_target(