diff options
27 files changed, 79 insertions, 77 deletions
diff --git a/clients/cli/meson.build b/clients/cli/meson.build index 396466a221..f5ca1c0ab9 100644 --- a/clients/cli/meson.build +++ b/clients/cli/meson.build @@ -22,7 +22,7 @@ deps = [ libnm_dep, libnmc_base_dep, libnmc_dep, - libnm_core_dep, + libnm_nm_default_dep, readline_dep, ] diff --git a/clients/common/meson.build b/clients/common/meson.build index 5ba5c9dbb7..bddb9cb629 100644 --- a/clients/common/meson.build +++ b/clients/common/meson.build @@ -4,6 +4,7 @@ nm_polkit_listener = files('nm-polkit-listener.c') deps = [ libnm_dep, + libnm_nm_default_dep, shared_nm_libnm_core_aux_dep, ] diff --git a/clients/common/tests/meson.build b/clients/common/tests/meson.build index 624dd89cd7..ab37e36196 100644 --- a/clients/common/tests/meson.build +++ b/clients/common/tests/meson.build @@ -7,7 +7,7 @@ exe = executable( libnm_dep, libnmc_dep, libnmc_base_dep, - libnm_core_dep, + libnm_nm_default_dep, ], c_args: clients_cflags + [ '-DNETWORKMANAGER_COMPILATION_TEST', @@ -31,6 +31,7 @@ exe = executable( ], dependencies: [ libnm_dep, + libnm_nm_default_dep, shared_nm_libnm_core_aux_dep, shared_nm_libnm_core_intern_dep, ], diff --git a/clients/meson.build b/clients/meson.build index 76d39fa78b..1c539d98ef 100644 --- a/clients/meson.build +++ b/clients/meson.build @@ -2,7 +2,7 @@ name = 'nm-online' deps = [ libnm_dep, - libnm_core_dep, + libnm_nm_default_dep, ] clients_cflags = [ diff --git a/clients/tui/meson.build b/clients/tui/meson.build index 837645a61e..17194579d3 100644 --- a/clients/tui/meson.build +++ b/clients/tui/meson.build @@ -1,8 +1,8 @@ name = 'nmtui' deps = [ + libnm_nm_default_dep, newt_dep, - libnm_core_dep, ] cflags = clients_cflags + [ diff --git a/dispatcher/meson.build b/dispatcher/meson.build index e9f3723c25..aaaedda5c8 100644 --- a/dispatcher/meson.build +++ b/dispatcher/meson.build @@ -25,7 +25,7 @@ sources = files('nm-dispatcher-utils.c') deps = [ libnm_dep, - libnm_core_dep, + libnm_nm_default_dep, ] cflags = [ diff --git a/dispatcher/tests/meson.build b/dispatcher/tests/meson.build index 9d6a16de1f..d339455b59 100644 --- a/dispatcher/tests/meson.build +++ b/dispatcher/tests/meson.build @@ -10,8 +10,9 @@ exe = executable( [ test_unit + '.c' ] + [ nmdbus_dispatcher_sources ], include_directories: incs, dependencies: [ - libnm_core_dep, libnm_dep, + libnm_nm_default_dep, + libnm_utils_base_dep, ], c_args: [ '-DNETWORKMANAGER_COMPILATION_TEST', diff --git a/examples/C/glib/meson.build b/examples/C/glib/meson.build index 47d64bddf9..1735581283 100644 --- a/examples/C/glib/meson.build +++ b/examples/C/glib/meson.build @@ -1,10 +1,10 @@ examples = [ - ['add-connection-gdbus', [libnm_enum[1]], [libnm_inc], [uuid_dep]], - ['add-connection-libnm', [], [], [libnm_dep]], - ['get-active-connections-gdbus', [libnm_enum[1]], [libnm_inc], []], - ['get-ap-info-libnm', [], [], [libnm_dep]], + ['add-connection-gdbus', [libnm_enum[1], nm_version_macro_header], [libnm_inc, shared_inc], [uuid_dep]], + ['add-connection-libnm', [nm_version_macro_header], [shared_inc], [libnm_dep]], + ['get-active-connections-gdbus', [libnm_enum[1], nm_version_macro_header], [libnm_inc, shared_inc], []], + ['get-ap-info-libnm', [nm_version_macro_header], [shared_inc], [libnm_dep]], ['list-connections-gdbus', [], [], []], - ['list-connections-libnm', [], [], [libnm_dep]], + ['list-connections-libnm', [nm_version_macro_header], [shared_inc], [libnm_dep]], ['monitor-nm-running-gdbus', [], [], []], ['monitor-nm-state-gdbus', [], [], []], ] diff --git a/libnm-core/meson.build b/libnm-core/meson.build index 01317c7c98..fb9be04a2c 100644 --- a/libnm-core/meson.build +++ b/libnm-core/meson.build @@ -1,5 +1,11 @@ libnm_core_inc = include_directories('.') +libnm_core_nm_default_dep = declare_dependency( + sources: nm_version_macro_header, + include_directories: libnm_core_inc, + dependencies: glib_nm_default_dep, +) + libnm_core_headers = files( 'nm-connection.h', 'nm-core-types.h', @@ -159,7 +165,7 @@ shared_nm_libnm_core_intern = static_library( include_directories: libnm_core_inc, dependencies: [ libnm_core_enum_dep, - libnm_utils_base_dep, + libnm_core_nm_default_dep, ], ) diff --git a/libnm-core/tests/meson.build b/libnm-core/tests/meson.build index 61a9445099..a9b3c9baab 100644 --- a/libnm-core/tests/meson.build +++ b/libnm-core/tests/meson.build @@ -32,8 +32,8 @@ test_cert_dir = join_paths(meson.current_source_dir(), 'certs') foreach test_unit: test_units exe = executable( 'libnm-core-' + test_unit, - [test_unit + '.c'] + enum, - dependencies: libnm_core_dep, + [test_unit + '.c', libnm_core_enum[1]] + enum, + dependencies: libnm_core_nm_default_dep, c_args: [ '-DNETWORKMANAGER_COMPILATION_TEST', '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE', diff --git a/libnm/meson.build b/libnm/meson.build index fbe6f847b1..e21710a9a1 100644 --- a/libnm/meson.build +++ b/libnm/meson.build @@ -1,5 +1,11 @@ libnm_inc = include_directories('.') +libnm_nm_default_dep = declare_dependency( + sources: libnm_core_enum[1], + include_directories: libnm_inc, + dependencies: libnm_core_nm_default_dep, +) + cflags = [ '-DG_LOG_DOMAIN="@0@"'.format(libnm_name), '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM', @@ -138,7 +144,7 @@ liblibnm = static_library( dl_dep, libudev_dep, libnm_core_dep, - libnm_utils_base_dep, + libnm_nm_default_dep, libnm_udev_aux_dep, uuid_dep, ], @@ -146,26 +152,10 @@ liblibnm = static_library( link_with: libnm_systemd_logging_stub, ) -liblibnm_dep = declare_dependency( - sources: libnm_enum[1], - include_directories: [ - libnm_inc, - libnm_core_inc, - ], - dependencies: [ - libnm_core_dep, - libnmdbus_dep, - libnm_utils_base_dep, - libudev_dep, - dl_dep, - uuid_dep, - ], - link_with: libnm_systemd_logging_stub, -) - libnm = shared_library( 'nm', version: libnm_version, + dependencies: libnm_nm_default_dep, link_whole: [ liblibnm, libnm_core, @@ -173,7 +163,6 @@ libnm = shared_library( libnmdbus, libnm_utils_base, ], - dependencies: liblibnm_dep, link_args: [ '-Wl,--version-script,@0@'.format(linker_script), ], diff --git a/libnm/tests/meson.build b/libnm/tests/meson.build index 65f5bb1b91..597c197b54 100644 --- a/libnm/tests/meson.build +++ b/libnm/tests/meson.build @@ -17,7 +17,7 @@ foreach test_unit: test_units test_unit[0] + '.c', nm_test_utils_impl_source, ], - dependencies: liblibnm_dep, + dependencies: libnm_nm_default_dep, c_args: cflags, link_with: [ liblibnm, @@ -39,6 +39,6 @@ libnm_vpn_plugin_utils_test = static_library( 'nm-vpn-plugin-utils-test', sources: nm_vpn_plugin_utils_source + [libnm_enum[1]], include_directories: libnm_inc, - dependencies: libnm_core_dep, + dependencies: libnm_nm_default_dep, c_args: cflags, ) diff --git a/shared/meson.build b/shared/meson.build index a9114ca40c..107c406694 100644 --- a/shared/meson.build +++ b/shared/meson.build @@ -1,5 +1,9 @@ shared_inc = include_directories('.') +nm_default_dep = declare_dependency(include_directories: [top_inc, shared_inc]) + +glib_nm_default_dep = declare_dependency(dependencies: [glib_dep, nm_default_dep]) + libc_siphash = static_library( 'c-siphash', sources: 'c-siphash/src/c-siphash.c', @@ -152,33 +156,26 @@ links = [ libnm_utils_base = static_library( 'nm-utils-base', sources: sources, - include_directories: top_inc, - dependencies: glib_dep, + dependencies: glib_nm_default_dep, c_args: c_flags, link_with: links, ) -incs = [ - top_inc, - shared_inc, -] - libnm_utils_base_dep = declare_dependency( - include_directories: incs, - dependencies: glib_dep, + dependencies: glib_nm_default_dep, link_with: libnm_utils_base, ) deps = [ + glib_nm_default_dep, libudev_dep, - libnm_utils_base_dep, ] libnm_udev_aux = static_library( 'nm-udev-aux', sources: 'nm-udev-aux/nm-udev-utils.c', - c_args: c_flags, dependencies: deps, + c_args: c_flags, ) libnm_udev_aux_dep = declare_dependency( @@ -239,20 +236,20 @@ libnm_systemd_shared = static_library( 'nm-systemd-shared', sources: sources, include_directories: incs, - dependencies: libnm_utils_base_dep, + dependencies: glib_nm_default_dep, c_args: c_flags, ) libnm_systemd_shared_dep = declare_dependency( include_directories: incs, - dependencies: libnm_utils_base_dep, + dependencies: glib_dep, link_with: libnm_systemd_shared, ) libnm_systemd_logging_stub = static_library( 'nm-systemd-logging-stub', sources: 'systemd/nm-logging-stub.c', - dependencies: libnm_utils_base_dep, + dependencies: glib_nm_default_dep, c_args: c_flags, ) diff --git a/src/devices/adsl/meson.build b/src/devices/adsl/meson.build index f92e809c97..d0492985dc 100644 --- a/src/devices/adsl/meson.build +++ b/src/devices/adsl/meson.build @@ -5,6 +5,7 @@ sources = files( deps = [ libudev_dep, + nm_default_dep, nm_dep, ] diff --git a/src/devices/bluetooth/meson.build b/src/devices/bluetooth/meson.build index 31fbf00674..8d9d788f34 100644 --- a/src/devices/bluetooth/meson.build +++ b/src/devices/bluetooth/meson.build @@ -6,6 +6,7 @@ sources = files( deps = [ libnm_wwan_dep, + nm_default_dep, nm_dep, ] diff --git a/src/devices/ovs/meson.build b/src/devices/ovs/meson.build index 834b27b014..49a19a2e17 100644 --- a/src/devices/ovs/meson.build +++ b/src/devices/ovs/meson.build @@ -8,6 +8,7 @@ sources = files( deps = [ jansson_dep, + nm_default_dep, nm_dep, ] diff --git a/src/devices/team/meson.build b/src/devices/team/meson.build index 3f755012b2..ca823ed27c 100644 --- a/src/devices/team/meson.build +++ b/src/devices/team/meson.build @@ -6,6 +6,7 @@ sources = files( deps = [ jansson_dep, libteamdctl_dep, + nm_default_dep, nm_dep, ] diff --git a/src/devices/wifi/meson.build b/src/devices/wifi/meson.build index 4dfbe4c8da..f97308685c 100644 --- a/src/devices/wifi/meson.build +++ b/src/devices/wifi/meson.build @@ -20,6 +20,7 @@ if enable_iwd endif deps = [ + nm_default_dep, nm_dep, ] diff --git a/src/devices/wwan/meson.build b/src/devices/wwan/meson.build index 363e522bf1..84c7dda125 100644 --- a/src/devices/wwan/meson.build +++ b/src/devices/wwan/meson.build @@ -8,6 +8,7 @@ sources = files( deps = [ libsystemd_dep, mm_glib_dep, + nm_default_dep, nm_dep, ] diff --git a/src/dhcp/meson.build b/src/dhcp/meson.build index c1f28be0e3..593e9d5ebc 100644 --- a/src/dhcp/meson.build +++ b/src/dhcp/meson.build @@ -8,7 +8,7 @@ cflags = [ executable( name, name + '.c', - dependencies: libnm_core_dep, + dependencies: glib_nm_default_dep, c_args: cflags, link_args: ldflags_linker_script_binary, link_depends: linker_script_binary, diff --git a/src/initrd/meson.build b/src/initrd/meson.build index acef8c4eac..516a8570b1 100644 --- a/src/initrd/meson.build +++ b/src/initrd/meson.build @@ -10,8 +10,7 @@ libnmi_core = static_library( 'nmi-core', c_args: nm_cflags, sources: sources, - include_directories: src_inc, - dependencies: libnm_core_dep, + dependencies: daemon_nm_default_dep, ) name = 'nm-initrd-generator' @@ -19,8 +18,7 @@ executable( name, name + '.c', c_args: nm_cflags, - include_directories: src_inc, - dependencies: [ libnm_core_dep ], + dependencies: daemon_nm_default_dep, link_with: [libnetwork_manager_base, libnmi_core], link_args: ldflags_linker_script_binary, link_depends: linker_script_binary, diff --git a/src/meson.build b/src/meson.build index ac03a568f5..5cc4c80f47 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,5 +1,11 @@ src_inc = include_directories('.') +daemon_nm_default_dep = declare_dependency( + sources: libnm_core_enum[1], + include_directories: src_inc, + dependencies: libnm_core_nm_default_dep, +) + install_data( 'org.freedesktop.NetworkManager.conf', install_dir: dbus_conf_dir, @@ -49,10 +55,11 @@ sources = files( ) deps = [ + daemon_nm_default_dep, libsystemd_dep, libudev_dep, - libnm_core_dep, libn_dhcp4_dep, + libnm_systemd_shared_dep, libnm_udev_aux_dep, ] @@ -152,10 +159,10 @@ sources = files( ) nm_deps = [ + daemon_nm_default_dep, dl_dep, libndp_dep, libudev_dep, - libnm_core_dep, libn_acd_dep, logind_dep, ] @@ -189,10 +196,10 @@ libnetwork_manager = static_library( ) deps = [ + daemon_nm_default_dep, dl_dep, libndp_dep, libudev_dep, - libnm_core_dep, ] name = 'nm-iface-helper' @@ -220,11 +227,6 @@ if enable_tests 'platform/nm-fake-platform.c', ) - deps = [ - libudev_dep, - libnm_core_dep, - ] - test_cflags = ['-DNETWORKMANAGER_COMPILATION_TEST'] if require_root_tests test_cflags += ['-DREQUIRE_ROOT_TESTS=1'] @@ -233,13 +235,13 @@ if enable_tests libnetwork_manager_test = static_library( nm_name + 'Test', sources: sources, - dependencies: deps, + dependencies: daemon_nm_default_dep, c_args: cflags + test_cflags, link_with: libnetwork_manager, ) test_nm_dep = declare_dependency( - dependencies: nm_dep, + dependencies: [daemon_nm_default_dep, nm_dep], compile_args: test_cflags, link_with: libnetwork_manager_test, ) diff --git a/src/ppp/meson.build b/src/ppp/meson.build index 04c539e3de..eeba278954 100644 --- a/src/ppp/meson.build +++ b/src/ppp/meson.build @@ -2,7 +2,7 @@ name = 'nm-pppd-plugin' deps = [ dl_dep, - libnm_core_dep, + libnm_core_nm_default_dep, ] nm_pppd_plugin = shared_module( @@ -22,6 +22,7 @@ nm_pppd_plugin = shared_module( name = 'nm-ppp-plugin' deps = [ + daemon_nm_default_dep, nm_dep, ] diff --git a/src/settings/plugins/ifcfg-rh/meson.build b/src/settings/plugins/ifcfg-rh/meson.build index 58acdcfcb1..404c0825c6 100644 --- a/src/settings/plugins/ifcfg-rh/meson.build +++ b/src/settings/plugins/ifcfg-rh/meson.build @@ -26,6 +26,7 @@ core_sources = files( ) deps = [ + nm_default_dep, nm_dep, ] diff --git a/src/settings/plugins/ifupdown/meson.build b/src/settings/plugins/ifupdown/meson.build index 365ae1a9c5..51d690cb95 100644 --- a/src/settings/plugins/ifupdown/meson.build +++ b/src/settings/plugins/ifupdown/meson.build @@ -4,6 +4,7 @@ sources = files( ) deps = [ + nm_default_dep, libudev_dep, nm_dep, ] diff --git a/src/systemd/meson.build b/src/systemd/meson.build index af1d0c8b35..64f0c3ccd1 100644 --- a/src/systemd/meson.build +++ b/src/systemd/meson.build @@ -27,19 +27,18 @@ libnm_systemd_core = static_library( 'nm-sd-utils-core.c', 'nm-sd-utils-dhcp.c', ), - include_directories: [ - src_inc, - include_directories( - 'sd-adapt-core', - 'src/libsystemd-network', - 'src/libsystemd/sd-event', - 'src/systemd', - ) - ], + include_directories: include_directories( + 'sd-adapt-core', + 'src/libsystemd-network', + 'src/libsystemd/sd-event', + 'src/systemd', + ), dependencies: [ - libnm_core_dep, + daemon_nm_default_dep, + libnm_systemd_shared_dep, ], c_args: [ '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD', ], + link_with: libc_siphash, ) diff --git a/src/tests/meson.build b/src/tests/meson.build index b2bc13ab37..df81f3ce47 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -35,8 +35,7 @@ cflags = [ exe = executable( test_unit, test_unit + '.c', - include_directories: src_inc, - dependencies: libnm_core_dep, + dependencies: daemon_nm_default_dep, c_args: cflags, link_with: [ libnm_systemd_core, |