diff --git a/meson.build b/meson.build index cbe2185ad9..7b8943f67d 100644 --- a/meson.build +++ b/meson.build @@ -1349,9 +1349,9 @@ install_libsystemd_static = static_library( 'systemd', libsystemd_sources, journal_client_sources, + basic_sources, + basic_gcrypt_sources, include_directories : includes, - link_with : [libbasic, - libbasic_gcrypt], build_by_default : static_libsystemd != 'false', install : static_libsystemd != 'false', install_dir : rootlibdir, @@ -1360,6 +1360,10 @@ install_libsystemd_static = static_library( librt, libxz, liblz4, + libcap, + libblkid, + libmount, + libselinux, libgcrypt], c_args : libsystemd_c_args + (static_libsystemd_pic ? [] : ['-fno-PIC'])) diff --git a/src/basic/meson.build b/src/basic/meson.build index 4f63fcef1c..ac954dbcb4 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -303,6 +303,9 @@ foreach item : [['af', af_list_txt, 'af', ''], endforeach basic_sources += [missing_h] + generated_gperf_headers +basic_gcrypt_sources = files( + 'gcrypt-util.c', + 'gcrypt-util.h') libbasic = static_library( 'basic', @@ -320,8 +323,7 @@ libbasic = static_library( # unnecessary linking to libgcrypt. libbasic_gcrypt = static_library( 'basic-gcrypt', - 'gcrypt-util.c', - 'gcrypt-util.h', + basic_gcrypt_sources, include_directories : includes, dependencies : [libgcrypt], c_args : ['-fvisibility=default']) diff --git a/src/shared/meson.build b/src/shared/meson.build index d0cb38650b..e3b076122b 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -2,7 +2,7 @@ # # Copyright 2017 Zbigniew Jędrzejewski-Szmek -shared_sources = ''' +shared_sources = files(''' acl-util.h acpi-fpdt.c acpi-fpdt.h @@ -104,25 +104,25 @@ shared_sources = ''' watchdog.c watchdog.h wireguard-netlink.h -'''.split() +'''.split()) test_tables_h = files('test-tables.h') shared_sources += [test_tables_h] if conf.get('HAVE_ACL') == 1 - shared_sources += ['acl-util.c'] + shared_sources += files('acl-util.c') endif if conf.get('ENABLE_UTMP') == 1 - shared_sources += ['utmp-wtmp.c'] + shared_sources += files('utmp-wtmp.c') endif if conf.get('HAVE_SECCOMP') == 1 - shared_sources += ['seccomp-util.c'] + shared_sources += files('seccomp-util.c') endif if conf.get('HAVE_LIBIPTC') == 1 - shared_sources += ['firewall-util.c'] + shared_sources += files('firewall-util.c') endif libshared_name = 'systemd-shared-@0@'.format(meson.project_version()) diff --git a/src/udev/meson.build b/src/udev/meson.build index 613a2e24cd..8fa0627d00 100644 --- a/src/udev/meson.build +++ b/src/udev/meson.build @@ -121,16 +121,16 @@ static_libudev = get_option('static-libudev') static_libudev_pic = static_libudev == 'true' or static_libudev == 'pic' install_libudev_static = static_library( 'udev', + basic_sources, + shared_sources, + libsystemd_sources, libudev_sources, include_directories : includes, - link_with : [libshared_static, - libsystemd_static], - link_whole : libudev_basic, build_by_default : static_libudev != 'false', install : static_libudev != 'false', install_dir : rootlibdir, link_depends : libudev_sym, - dependencies : [threads], + dependencies : libshared_deps + [libmount], c_args : static_libudev_pic ? [] : ['-fno-PIC'], pic : static_libudev_pic)