From bc3f5ca6a9fd15434c2998d2f1bc73a8e38dfe0b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 2 Dec 2019 09:38:57 +0100 Subject: [PATCH] build/meson: fix link failure of bluetooth's nm-bt-test $ meson . build -D bluez5_dun=true -D selinux=false -D qt=false (cherry picked from commit 390086a3cc824aaffe61ce63162cf389513bad77) --- src/devices/bluetooth/meson.build | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/devices/bluetooth/meson.build b/src/devices/bluetooth/meson.build index a77ad60d46..f0507c232b 100644 --- a/src/devices/bluetooth/meson.build +++ b/src/devices/bluetooth/meson.build @@ -15,11 +15,22 @@ if enable_bluez5_dun deps += bluez5_dep endif -libnm_device_plugin_bluetooth = shared_module( - 'nm-device-plugin-bluetooth', +libnm_device_plugin_bluetooth_static = static_library( + 'nm-device-plugin-bluetooth-static', sources: sources, dependencies: deps, c_args: daemon_c_flags, +) + +libnm_device_plugin_bluetooth_static_dep = declare_dependency( + link_whole: libnm_device_plugin_bluetooth_static, +) + +deps += libnm_device_plugin_bluetooth_static_dep + +libnm_device_plugin_bluetooth = shared_module( + 'nm-device-plugin-bluetooth', + dependencies: deps, link_args: ldflags_linker_script_devices, link_depends: linker_script_devices, install: true, @@ -41,7 +52,7 @@ if enable_tests executable( test_unit, 'tests/' + test_unit + '.c', - dependencies: libnetwork_manager_test_dep, + dependencies: [ libnetwork_manager_test_dep, deps ], c_args: test_c_flags, ) endif