From 70848ecfc6306711197394c0926e443e803ae870 Mon Sep 17 00:00:00 2001 From: Davide Cavalca Date: Mon, 9 Apr 2018 02:43:35 -0700 Subject: meson: add support for building static libsystemd and libudev --- src/udev/meson.build | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/udev') diff --git a/src/udev/meson.build b/src/udev/meson.build index a58191d4a7..a9b345e70f 100644 --- a/src/udev/meson.build +++ b/src/udev/meson.build @@ -111,12 +111,27 @@ libudev_basic = static_library( c_args : ['-fvisibility=default']) libudev_static = static_library( - 'udev', + 'udev_static', 'udev.h', include_directories : includes, link_with : udev_link_with, link_whole : libudev_basic) +static_libudev = get_option('static-libudev') +install_libudev_static = static_library( + 'udev', + 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], + pic : static_libudev == 'true' or static_libudev == 'pic') + libudev = shared_library( 'udev', 'udev.h', # pick a header file at random to work around old meson bug -- cgit v1.2.1