[PATCH] meson: Improve dependency system
- From: Iñigo Martínez <inigomartinez gmail com>
- To: networkmanager-list gnome org
- Subject: [PATCH] meson: Improve dependency system
- Date: Sun, 7 Jan 2018 17:50:27 +0100
Some targets are missing dependencies on some generated sources in
the meson port. These makes the building fail due to missing source
files on a highly multithreaded building.
These dependencies have been resolved by taking advantage of meson's
internal dependencies and reviewing the whole meson build port.
meson's internal dependencies can be used to pass source files,
include directories, libraries and compiler flags. One of such
internal dependencies called nm_core_dep, holds all the directories
that must be included, core enum types and default glib libraries
and compiler flags.
These have allowed minimizing the build details which are inherited
by using that dependency and better multithreading building.
The strings holding the names used for libraries have also been
moved to different variables, so they would be less error prone by
reusing these and meson would detect any typing error.
---
clients/cli/meson.build | 17 +++----
clients/common/meson.build | 28 ++++-------
clients/common/tests/meson.build | 7 +--
clients/meson.build | 13 ++---
clients/tui/meson.build | 17 +++----
clients/tui/newt/meson.build | 7 ++-
dispatcher/meson.build | 12 +----
dispatcher/tests/meson.build | 13 ++---
examples/C/glib/meson.build | 41 +++++++++-------
introspection/meson.build | 7 ++-
libnm-core/meson.build | 17 +++----
libnm-core/tests/meson.build | 10 +---
libnm-glib/meson.build | 54 +++++++++------------
libnm-glib/tests/meson.build | 12 ++---
libnm-util/meson.build | 28 +++++------
libnm-util/tests/meson.build | 15 ++----
libnm/meson.build | 36 ++++++--------
libnm/tests/meson.build | 22 ++-------
meson.build | 9 +++-
shared/meson.build | 14 ++++--
src/devices/adsl/meson.build | 4 +-
src/devices/bluetooth/meson.build | 4 +-
src/devices/ovs/meson.build | 4 +-
src/devices/team/meson.build | 4 +-
src/devices/tests/meson.build | 2 +-
src/devices/wifi/meson.build | 4 +-
src/devices/wifi/tests/meson.build | 2 +-
src/devices/wwan/meson.build | 8 ++--
src/dhcp/meson.build | 3 +-
src/dhcp/tests/meson.build | 2 +-
src/dnsmasq/tests/meson.build | 2 +-
src/meson.build | 63 ++++++++++++-------------
src/ndisc/tests/meson.build | 4 +-
src/platform/tests/meson.build | 4 +-
src/ppp/meson.build | 10 ++--
src/settings/plugins/ibft/meson.build | 4 +-
src/settings/plugins/ibft/tests/meson.build | 2 +-
src/settings/plugins/ifcfg-rh/meson.build | 4 +-
src/settings/plugins/ifcfg-rh/tests/meson.build | 2 +-
src/settings/plugins/ifupdown/meson.build | 4 +-
src/settings/plugins/ifupdown/tests/meson.build | 2 +-
src/settings/plugins/keyfile/tests/meson.build | 2 +-
src/supplicant/tests/meson.build | 2 +-
src/systemd/meson.build | 11 ++---
src/tests/config/meson.build | 2 +-
src/tests/meson.build | 12 ++---
vapi/meson.build | 6 +--
47 files changed, 234 insertions(+), 318 deletions(-)
diff --git a/clients/cli/meson.build b/clients/cli/meson.build
index bfe7de56c..a2e088ba8 100644
--- a/clients/cli/meson.build
+++ b/clients/cli/meson.build
@@ -1,3 +1,5 @@
+name = 'nmcli'
+
# FIXME: nmcli-completion should be renamed to nmcli
install_data(
'nmcli-completion',
@@ -16,22 +18,16 @@ sources = files(
'utils.c'
)
-incs = [
- top_inc,
- shared_inc,
- libnm_core_inc
-]
-
deps = [
- glib_dep,
libnm_dep,
libnmc_dep,
libnmc_base_dep,
+ nm_core_dep,
readline_dep
]
cflags = [
- '-DG_LOG_DOMAIN="nmcli"',
+ '-DG_LOG_DOMAIN="@0@"'.format(name),
'-DNMCLI_LOCALEDIR="@0@"'.format(nm_localedir)
]
@@ -47,9 +43,8 @@ if enable_polkit_agent
endif
executable(
- 'nmcli',
- sources + [libnm_core_enum[1]],
- include_directories: incs,
+ name,
+ sources,
dependencies: deps,
c_args: cflags,
link_args: ldflags,
diff --git a/clients/common/meson.build b/clients/common/meson.build
index 861a4442f..0ebe6c9f0 100644
--- a/clients/common/meson.build
+++ b/clients/common/meson.build
@@ -2,15 +2,9 @@ common_inc = include_directories('.')
nm_polkit_listener = files('nm-polkit-listener.c')
-incs = [
- top_inc,
- shared_inc,
- libnm_core_inc
-]
-
deps = [
- glib_dep,
- libnm_dep
+ libnm_dep,
+ nm_core_dep
]
cflags = [
@@ -26,15 +20,14 @@ sources = shared_utils + files(
libnmc_base = static_library(
'nmc-base',
- sources: sources + [libnm_core_enum[1]],
- include_directories: incs,
+ sources: sources,
dependencies: deps,
- c_args: common_cflags
+ c_args: cflags
)
libnmc_base_dep = declare_dependency(
- link_with: libnmc_base,
- include_directories: common_inc
+ include_directories: common_inc,
+ link_with: libnmc_base
)
sources = shared_meta_setting + files(
@@ -72,17 +65,16 @@ sources += settings_docs_source
libnmc = static_library(
'nmc',
- sources: sources + [libnm_core_enum[1]],
- include_directories: incs,
+ sources: sources,
dependencies: deps,
- c_args: common_cflags,
+ c_args: cflags,
link_with: libnmc_base,
link_depends: settings_docs_source
)
libnmc_dep = declare_dependency(
- link_with: libnmc,
- include_directories: common_inc
+ include_directories: common_inc,
+ link_with: libnmc
)
if (enable_introspection or enable_nmtui) and enable_tests
diff --git a/clients/common/tests/meson.build b/clients/common/tests/meson.build
index 84777011b..d4ea8358f 100644
--- a/clients/common/tests/meson.build
+++ b/clients/common/tests/meson.build
@@ -1,14 +1,15 @@
test_unit = 'test-general'
-deps += [
+deps = [
+ libnm_dep,
libnmc_dep,
- libnmc_base_dep
+ libnmc_base_dep,
+ nm_core_dep
]
exe = executable(
'clients-' + test_unit,
test_unit + '.c',
- include_directories: incs,
dependencies: deps,
c_args: cflags
)
diff --git a/clients/meson.build b/clients/meson.build
index 1e197d376..7c8aee426 100644
--- a/clients/meson.build
+++ b/clients/meson.build
@@ -1,14 +1,8 @@
name = 'nm-online'
-incs = [
- top_inc,
- shared_inc,
- libnm_core_inc
-]
-
deps = [
- glib_dep,
- libnm_dep
+ libnm_dep,
+ nm_core_dep
]
cflags = [
@@ -23,8 +17,7 @@ endif
executable(
name,
- [name + '.c', libnm_core_enum[1]],
- include_directories: incs,
+ name + '.c',
dependencies: deps,
c_args: cflags,
link_args: ldflags,
diff --git a/clients/tui/meson.build b/clients/tui/meson.build
index 2bff05359..194e4b11a 100644
--- a/clients/tui/meson.build
+++ b/clients/tui/meson.build
@@ -1,15 +1,11 @@
-incs = [
- top_inc,
- shared_inc,
- libnm_core_inc
-]
+name = 'nmtui'
deps = [
- glib_dep,
- newt_dep
+ newt_dep,
+ nm_core_dep
]
-cflags = ['-DG_LOG_DOMAIN="nmtui"']
+cflags = ['-DG_LOG_DOMAIN="@0@"'.format(name)]
subdir('newt')
@@ -70,9 +66,8 @@ if have_version_script
endif
executable(
- 'nmtui',
- sources + [libnm_core_enum[1]],
- include_directories: incs,
+ name,
+ sources,
dependencies: deps,
c_args: cflags,
link_args: ldflags,
diff --git a/clients/tui/newt/meson.build b/clients/tui/newt/meson.build
index ec14f1264..08fefc534 100644
--- a/clients/tui/newt/meson.build
+++ b/clients/tui/newt/meson.build
@@ -23,13 +23,12 @@ sources = files(
libnmt_newt = static_library(
'nmt-newt',
- sources: sources + [libnm_core_enum[1]],
- include_directories: incs,
+ sources: sources,
dependencies: deps,
c_args: cflags
)
libnmt_newt_dep = declare_dependency(
- link_with: libnmt_newt,
- include_directories: include_directories('.')
+ include_directories: include_directories('.'),
+ link_with: libnmt_newt
)
diff --git a/dispatcher/meson.build b/dispatcher/meson.build
index 20e64e628..00ab5e709 100644
--- a/dispatcher/meson.build
+++ b/dispatcher/meson.build
@@ -25,15 +25,9 @@ install_data(
sources = files('nm-dispatcher-utils.c')
-incs = [
- top_inc,
- shared_inc,
- libnm_core_inc
-]
-
deps = [
- glib_dep,
- libnm_dep
+ libnm_dep,
+ nm_core_dep
]
cflags = [
@@ -45,7 +39,6 @@ cflags = [
libnm_dispatcher_core = static_library(
name + '-core',
sources: sources,
- include_directories: incs,
dependencies: deps,
c_args: cflags
)
@@ -67,7 +60,6 @@ endif
executable(
name,
sources,
- include_directories: incs,
dependencies: deps,
c_args: cflags,
link_with: libnm_dispatcher_core,
diff --git a/dispatcher/tests/meson.build b/dispatcher/tests/meson.build
index 20caf61d9..c60ec3183 100644
--- a/dispatcher/tests/meson.build
+++ b/dispatcher/tests/meson.build
@@ -1,19 +1,12 @@
test_unit = 'test-dispatcher-envp'
-incs = [
- top_inc,
- shared_inc,
- libnm_core_inc,
- dispatcher_inc
-]
-
cflags = '-DSRCDIR="@0@"'.format(meson.current_source_dir())
exe = executable(
test_unit,
- [test_unit + '.c', libnm_core_enum[1]],
- include_directories: incs,
- dependencies: glib_dep,
+ test_unit + '.c',
+ include_directories: dispatcher_inc,
+ dependencies: nm_core_dep,
c_args: cflags,
link_with: libnm_dispatcher_core
)
diff --git a/examples/C/glib/meson.build b/examples/C/glib/meson.build
index c32ebdeed..c5c799db0 100644
--- a/examples/C/glib/meson.build
+++ b/examples/C/glib/meson.build
@@ -1,27 +1,34 @@
+cflags = '-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE'
+
examples = [
- ['add-connection-gdbus', [uuid_dep], [libnm_core_enum[1], libnm_enum[1]]],
- ['add-connection-libnm', [libnm_dep], []],
- ['get-active-connections-gdbus', [], [libnm_core_enum[1], libnm_enum[1]]],
- ['get-ap-info-libnm', [libnm_dep], []],
- ['list-connections-gdbus', [], []],
- ['list-connections-libnm', [libnm_dep], []],
- ['monitor-nm-running-gdbus', [], []],
- ['monitor-nm-state-gdbus', [], []]
+ 'add-connection-libnm',
+ 'get-ap-info-libnm',
+ 'list-connections-libnm',
]
-incs = [
- top_inc,
- shared_inc,
- libnm_core_inc,
- libnm_inc
+foreach example: examples
+ executable(
+ example,
+ example + '.c',
+ dependencies: [libnm_dep, nm_core_dep],
+ c_args: cflags
+ )
+endforeach
+
+examples = [
+ ['add-connection-gdbus', [libnm_enum[1]], [libnm_inc], [uuid_dep]],
+ ['get-active-connections-gdbus', [libnm_enum[1]], [libnm_inc], []],
+ ['list-connections-gdbus', [], [], []],
+ ['monitor-nm-running-gdbus', [], [], []],
+ ['monitor-nm-state-gdbus', [], [], []]
]
foreach example: examples
executable(
example[0],
- [example[0] + '.c'] + example[2],
- include_directories: incs,
- dependencies: [glib_dep] + example[1],
- c_args: '-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE'
+ [example[0] + '.c'] + example[1],
+ include_directories: example[2],
+ dependencies: [nm_core_dep] + example[3],
+ c_args: cflags
)
endforeach
diff --git a/introspection/meson.build b/introspection/meson.build
index cac63bc77..b3fdbecd1 100644
--- a/introspection/meson.build
+++ b/introspection/meson.build
@@ -93,6 +93,9 @@ libnmdbus = static_library(
)
libnmdbus_dep = declare_dependency(
- link_with: libnmdbus,
- include_directories: include_directories('.')
+ # FIXME: only headers should be added here to resolve dependencies on
+ # libNetworkManagerBase and libNetworkManager
+ #sources: sources,
+ include_directories: include_directories('.'),
+ link_with: libnmdbus
)
diff --git a/libnm-core/meson.build b/libnm-core/meson.build
index 97040709f..31ea1111a 100644
--- a/libnm-core/meson.build
+++ b/libnm-core/meson.build
@@ -127,21 +127,16 @@ libnm_core_enum = gnome.mkenums(
install_dir: libnm_pkgincludedir
)
-incs = [
- top_inc,
- shared_inc
-]
-
deps = [
crypto_dep,
dl_dep,
- glib_dep,
libudev_dep,
+ shared_dep,
uuid_dep
]
cflags = [
- '-DG_LOG_DOMAIN="libnm"',
+ '-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB',
'-DLIBEXECDIR="@0@"'.format(nm_libexecdir),
'-DLOCALEDIR="@0@"'.format(nm_localedir),
@@ -157,11 +152,17 @@ endif
libnm_core = static_library(
'nm-core',
sources: libnm_core_sources + libnm_core_enum + shared_sources + [version_header],
- include_directories: incs,
+ include_directories: top_inc,
dependencies: deps,
c_args: cflags
)
+nm_core_dep = declare_dependency(
+ sources: libnm_core_enum[1],
+ include_directories: libnm_core_inc,
+ dependencies: shared_dep
+)
+
enums_to_docbook = join_paths(meson.source_root(), 'tools', 'enums-to-docbook.pl')
docbooks = [
diff --git a/libnm-core/tests/meson.build b/libnm-core/tests/meson.build
index d3fab70b1..ae6452433 100644
--- a/libnm-core/tests/meson.build
+++ b/libnm-core/tests/meson.build
@@ -27,12 +27,6 @@ test_units = [
'test-settings-defaults'
]
-incs = [
- top_inc,
- shared_inc,
- libnm_core_inc
-]
-
test_cert_dir = join_paths(meson.current_source_dir(), 'certs')
cflags = '-DTEST_CERT_DIR="@0@"'.format(test_cert_dir)
@@ -41,8 +35,8 @@ foreach test_unit: test_units
exe = executable(
'libnm-core-' + test_unit,
[test_unit + '.c'] + enum,
- include_directories: incs,
- dependencies: glib_dep,
+ include_directories: top_inc,
+ dependencies: nm_core_dep,
c_args: cflags,
link_with: libnm_core
)
diff --git a/libnm-glib/meson.build b/libnm-glib/meson.build
index 43497e60e..5f2663ddd 100644
--- a/libnm-glib/meson.build
+++ b/libnm-glib/meson.build
@@ -1,23 +1,18 @@
-dbus_binding_tool = find_program('dbus-binding-tool')
+libnm_glib_inc = include_directories('.')
-common_incs = [
- top_inc,
- shared_inc
-]
+dbus_binding_tool = find_program('dbus-binding-tool')
common_deps = [
dbus_dep,
dbus_glib_dep,
- glib_dep
+ shared_dep
]
common_cflags = [
- '-DG_LOG_DOMAIN="libnm-glib"',
+ '-DG_LOG_DOMAIN="@0@"'.format(libnm_glib_name),
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY'
]
-libnm_glib_inc = include_directories('.')
-
vpn_headers = files(
'nm-vpn-plugin.h',
'nm-vpn-plugin-ui-interface.h',
@@ -59,11 +54,9 @@ deprecated_headers = files('libnm_glib.h')
install_headers(
headers + vpn_headers + deprecated_headers,
- subdir: 'libnm-glib'
+ subdir: libnm_glib_name
)
-incs = common_incs + [libnm_util_inc]
-
cflags = common_cflags + [
'-Wno-deprecated-declarations',
'-Wno-deprecated'
@@ -72,7 +65,7 @@ cflags = common_cflags + [
libdeprecated_nm_glib = static_library(
'deprecated-nm-glib',
sources: 'libnm_glib.c',
- include_directories: incs,
+ include_directories: libnm_util_inc,
dependencies: common_deps,
c_args: cflags
)
@@ -115,9 +108,8 @@ endif
libnm_glib_vpn = shared_library(
'nm-glib-vpn',
- sources: sources + libnm_glib_vpn_enum + [libnm_utils_enum[1]],
+ sources: sources + libnm_glib_vpn_enum,
version: libnm_glib_vpn_version,
- include_directories: common_incs,
dependencies: deps,
c_args: common_cflags,
link_args: ldflags,
@@ -126,17 +118,17 @@ libnm_glib_vpn = shared_library(
)
libnm_glib_vpn_dep = declare_dependency(
- link_with: libnm_glib_vpn,
- include_directories: libnm_glib_inc
+ include_directories: libnm_glib_inc,
+ link_with: libnm_glib_vpn
)
pkg.generate(
libraries: libnm_glib_vpn,
version: nm_version,
- name: 'libnm-glib-vpn',
+ name: libnm_glib_vpn_name,
description: 'Convenience library for NetworkManager VPN plugins',
- filebase: 'libnm-glib-vpn',
- subdirs: 'libnm-glib',
+ filebase: libnm_glib_vpn_name,
+ subdirs: libnm_glib_name,
requires: 'NetworkManager >= ' + nm_version + ' glib-2.0 dbus-glib-1',
variables: 'exec_prefix=${prefix}'
)
@@ -196,8 +188,8 @@ libnm_glib_enum = gnome.mkenums(
)
deps = common_deps + [
- libudev_dep,
- libnm_util_dep
+ libnm_util_dep,
+ libudev_dep
]
cflags = common_cflags + ['-DNMRUNDIR="@0@"'.format(nm_pkgrundir)]
@@ -211,9 +203,8 @@ endif
libnm_glib = shared_library(
'nm-glib',
- sources: sources + libnm_glib_enum + [nm_secret_agent_glue, libnm_utils_enum[1]],
+ sources: sources + libnm_glib_enum + [nm_secret_agent_glue],
version: libnm_glib_version,
- include_directories: common_incs,
dependencies: deps,
c_args: cflags,
link_with: libdeprecated_nm_glib,
@@ -223,17 +214,17 @@ libnm_glib = shared_library(
)
libnm_glib_dep = declare_dependency(
- link_with: libnm_glib,
- include_directories: libnm_glib_inc
+ include_directories: libnm_glib_inc,
+ link_with: libnm_glib
)
pkg.generate(
libraries: libnm_glib,
version: nm_version,
- name: 'libnm-glib',
+ name: libnm_glib_name,
description: 'Convenience library for clients of NetworkManager',
- filebase: 'libnm-glib',
- subdirs: 'libnm-glib',
+ filebase: libnm_glib_name,
+ subdirs: libnm_glib_name,
requires: 'libnm-util >= ' + nm_version + ' NetworkManager >= ' + nm_version + ' gobject-2.0 dbus-glib-1',
variables: 'exec_prefix=${prefix}'
)
@@ -260,7 +251,7 @@ if enable_introspection
namespace: 'NMClient',
identifier_prefix: nm_id_prefix,
symbol_prefix: nm_id_prefix.to_lower(),
- export_packages: ['libnm-glib', 'libnm-glib-vpn'],
+ export_packages: [libnm_glib_name, libnm_glib_vpn_name],
includes: gir_includes,
extra_args: common_cflags + ['--include-uninstalled=' + libnm_util_gir[0].full_path()],
install: true
@@ -273,8 +264,7 @@ deps = common_deps + [libnm_util_dep]
executable(
name,
- [name + '.c', libnm_utils_enum[1]],
- include_directories: common_incs,
+ name + '.c',
dependencies: deps,
c_args: common_cflags,
link_with: libnm_glib
diff --git a/libnm-glib/tests/meson.build b/libnm-glib/tests/meson.build
index c655f5fd9..c578c2985 100644
--- a/libnm-glib/tests/meson.build
+++ b/libnm-glib/tests/meson.build
@@ -1,14 +1,9 @@
-incs = [
- top_inc,
- shared_inc
-]
-
deps = [
dbus_dep,
dbus_glib_dep,
- glib_dep,
libnm_glib_dep,
- libnm_util_dep
+ libnm_util_dep,
+ shared_dep
]
cflags = [
@@ -24,8 +19,7 @@ test_units = [
foreach test_unit: test_units
exe = executable(
test_unit,
- [test_unit + '.c', libnm_utils_enum[1]] + shared_test_utils,
- include_directories: incs,
+ [test_unit + '.c'] + shared_test_utils,
dependencies: deps,
c_args: cflags
)
diff --git a/libnm-util/meson.build b/libnm-util/meson.build
index 2d49def2b..ae55096fd 100644
--- a/libnm-util/meson.build
+++ b/libnm-util/meson.build
@@ -91,21 +91,16 @@ sources = shared_utils + files(
'nm-value-transforms.c'
)
-incs = [
- top_inc,
- shared_inc
-]
-
deps = [
crypto_dep,
dbus_dep,
dbus_glib_dep,
- glib_dep,
+ shared_dep,
uuid_dep
]
cflags = [
- '-DG_LOG_DOMAIN="libnm-util"',
+ '-DG_LOG_DOMAIN="@0@"'.format(libnm_util_name),
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY',
'-DLOCALEDIR="@0@"'.format(nm_localedir)
]
@@ -121,7 +116,6 @@ libnm_util = shared_library(
'nm-util',
sources: sources + libnm_utils_enum,
version: libnm_util_version,
- include_directories: incs,
dependencies: deps,
c_args: cflags,
link_args: ldflags,
@@ -130,16 +124,17 @@ libnm_util = shared_library(
)
libnm_util_dep = declare_dependency(
- link_with: libnm_util,
- include_directories: libnm_util_inc
+ sources: libnm_utils_enum[1],
+ include_directories: libnm_util_inc,
+ link_with: libnm_util
)
pkg.generate(
libraries: libnm_util,
version: nm_version,
- name: 'libnm-util',
+ name: libnm_util_name,
description: 'Convenience library for clients of NetworkManager',
- filebase: 'libnm-util',
+ filebase: libnm_util_name,
subdirs: nm_name,
requires: 'NetworkManager >= ' + nm_version + ' glib-2.0 dbus-glib-1',
variables: 'exec_prefix=${prefix}'
@@ -160,14 +155,14 @@ if enable_introspection
namespace: nm_name,
identifier_prefix: nm_id_prefix,
symbol_prefix: nm_id_prefix.to_lower(),
- export_packages: 'libnm-util',
+ export_packages: libnm_util_name,
includes: gir_includes,
install: true
)
libnm_util_gir_dep = declare_dependency(
- link_with: libnm_util,
- sources: libnm_util_gir
+ sources: libnm_util_gir,
+ link_with: libnm_util
)
endif
@@ -184,13 +179,12 @@ sources = files(
deps = [
crypto_dep,
- glib_dep
+ shared_dep
]
libtest_crypto = static_library(
'test-crypto',
sources: sources,
- include_directories: incs,
dependencies: deps,
c_args: cflags
)
diff --git a/libnm-util/tests/meson.build b/libnm-util/tests/meson.build
index cb1656a90..4ba889b4e 100644
--- a/libnm-util/tests/meson.build
+++ b/libnm-util/tests/meson.build
@@ -1,13 +1,8 @@
-incs = [
- top_inc,
- shared_inc
-]
-
deps = [
dbus_dep,
dbus_glib_dep,
- glib_dep,
- libnm_util_dep
+ libnm_util_dep,
+ shared_dep
]
cflags = [
@@ -19,8 +14,7 @@ test = 'test-libnm-linking'
test_libnm_linking = executable(
test,
- [test + '.c', libnm_utils_enum[1]],
- include_directories: incs,
+ test + '.c',
dependencies: deps + [libnm_dep],
c_args: cflags
)
@@ -37,8 +31,7 @@ test_units = [
foreach test_unit: test_units
exe = executable(
'libnm-util-' + test_unit[0],
- [test_unit[0] + '.c', libnm_utils_enum[1]],
- include_directories: incs,
+ test_unit[0] + '.c',
dependencies: deps,
c_args: cflags,
link_with: test_unit[1],
diff --git a/libnm/meson.build b/libnm/meson.build
index 80158c2fa..755104a4a 100644
--- a/libnm/meson.build
+++ b/libnm/meson.build
@@ -6,29 +6,22 @@ if have_fake_typelibs
subdir('fake-typelib')
endif
-incs = [
- top_inc,
- shared_inc,
- libnm_core_inc
-]
-
deps = [
# FIXME: this makes GIR mandatory?
gir_dep,
- glib_dep,
- libnmdbus_dep
+ libnmdbus_dep,
+ shared_dep
]
cflags = [
- '-DG_LOG_DOMAIN="libnm"',
- '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB',
- '-DNMRUNDIR="@0@"'.format(nm_pkgrundir)
+ '-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
+ '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB'
]
libnm_utils = static_library(
'nm-utils',
sources: sources,
- include_directories: incs,
+ include_directories: libnm_core_inc,
dependencies: deps,
c_args: cflags
)
@@ -78,7 +71,7 @@ libnm_headers = files(
install_headers(
libnm_core_headers + libnm_headers + [version_header],
- subdir: 'libnm'
+ subdir: libnm_name
)
enum_headers = libnm_headers + [version_header]
@@ -145,8 +138,8 @@ libnm_sources = files(
deps = [
dl_dep,
- glib_dep,
libudev_dep,
+ shared_dep,
uuid_dep
]
@@ -161,7 +154,7 @@ libnm = shared_library(
'nm',
sources: libnm_sources + libnm_enum,
version: libnm_version,
- include_directories: incs + [libnm_core_inc],
+ include_directories: libnm_core_inc,
dependencies: deps,
c_args: cflags,
link_with: libnm_utils,
@@ -172,17 +165,18 @@ libnm = shared_library(
)
libnm_dep = declare_dependency(
- link_with: libnm,
- include_directories: libnm_inc
+ sources: libnm_enum[1],
+ include_directories: libnm_inc,
+ link_with: libnm
)
pkg.generate(
libraries: libnm,
version: nm_version,
- name: 'libnm',
+ name: libnm_name,
description: 'Convenience library for clients of NetworkManager',
- filebase: 'libnm',
- subdirs: 'libnm',
+ filebase: libnm_name,
+ subdirs: libnm_name,
requires: 'gio-2.0',
variables: [
'exec_prefix=${prefix}',
@@ -206,7 +200,7 @@ if enable_introspection
namespace: 'NM',
identifier_prefix: nm_id_prefix,
symbol_prefix: nm_id_prefix.to_lower(),
- export_packages: 'libnm',
+ export_packages: libnm_name,
includes: 'Gio-2.0',
extra_args: cflags,
install: true
diff --git a/libnm/tests/meson.build b/libnm/tests/meson.build
index fa7470f98..54ba8ee31 100644
--- a/libnm/tests/meson.build
+++ b/libnm/tests/meson.build
@@ -6,15 +6,9 @@ test_units = [
#['test-secret-agent', shared_test_utils, []]
]
-incs = [
- top_inc,
- shared_inc,
- libnm_core_inc
-]
-
deps = [
- glib_dep,
- libnm_dep
+ libnm_dep,
+ nm_core_dep
]
cflags = [
@@ -26,7 +20,6 @@ foreach test_unit: test_units
exe = executable(
'libnm-' + test_unit[0],
[test_unit[0] + '.c'] + test_unit[1],
- include_directories: incs,
dependencies: deps,
c_args: cflags,
link_with: test_unit[2]
@@ -35,17 +28,10 @@ foreach test_unit: test_units
test(test_unit[0], exe)
endforeach
-incs = [
- top_inc,
- shared_inc,
- libnm_core_inc,
- libnm_inc
-]
-
# just test, that we can build "nm-vpn-plugin-utils.c"
libnm_vpn_plugin_utils_test = static_library(
'nm-vpn-plugin-utils-test',
sources: shared_vpn_plugin_utils + [libnm_enum[1]],
- include_directories: incs,
- dependencies: glib_dep
+ include_directories: libnm_inc,
+ dependencies: nm_core_dep
)
diff --git a/meson.build b/meson.build
index 16195467a..edacd0dff 100644
--- a/meson.build
+++ b/meson.build
@@ -42,18 +42,25 @@ nm_pkglibdir = join_paths(nm_libdir, nm_name)
nm_pkgrundir = join_paths(nm_runstatedir, nm_name)
nm_pkgstatedir = join_paths(nm_localstatedir, nm_name)
+libnm_name = 'libnm'
+
current = 1
revision = 0
age = 1
libnm_version = '@0@.@1@.@2@'.format(current - age, age, revision)
-libnm_pkgincludedir = join_paths(nm_includedir, 'libnm')
+libnm_pkgincludedir = join_paths(nm_includedir, libnm_name)
+
+libnm_util_name = 'libnm-util'
current = 9
revision = 0
age = 7
libnm_util_version = '@0@.@1@.@2@'.format(current - age, age, revision)
+libnm_glib_name = 'libnm-glib'
+libnm_glib_vpn_name = libnm_glib_name + '-vpn'
+
current = 13
revision = 0
age = 9
diff --git a/shared/meson.build b/shared/meson.build
index d3c1df0df..2d0281b93 100644
--- a/shared/meson.build
+++ b/shared/meson.build
@@ -1,7 +1,4 @@
-shared_inc = include_directories(
- '.',
- 'nm-utils'
-)
+shared_inc = include_directories('.')
version_conf = configuration_data()
version_conf.set('NM_MAJOR_VERSION', nm_major_version)
@@ -37,3 +34,12 @@ shared_sources = shared_utils + shared_meta_setting + shared_udev_utils + files(
'nm-utils/c-list-util.c',
'nm-utils/nm-dedup-multi.c'
)
+
+shared_dep = declare_dependency(
+ include_directories: [
+ top_inc,
+ shared_inc,
+ include_directories('nm-utils')
+ ],
+ dependencies: glib_dep
+)
diff --git a/src/devices/adsl/meson.build b/src/devices/adsl/meson.build
index 9b4dc8428..bca488e50 100644
--- a/src/devices/adsl/meson.build
+++ b/src/devices/adsl/meson.build
@@ -4,9 +4,9 @@ sources = files(
)
deps = [
- core_dep,
libnmdbus_dep,
- libudev_dep
+ libudev_dep,
+ nm_dep
]
ldflags = []
diff --git a/src/devices/bluetooth/meson.build b/src/devices/bluetooth/meson.build
index 2e59810df..e1ce74b31 100644
--- a/src/devices/bluetooth/meson.build
+++ b/src/devices/bluetooth/meson.build
@@ -9,9 +9,9 @@ sources = files(
)
deps = [
- core_dep,
+ libnmdbus_dep,
libnm_wwan_dep,
- libnmdbus_dep
+ nm_dep
]
ldflags = []
diff --git a/src/devices/ovs/meson.build b/src/devices/ovs/meson.build
index dbbb9e77a..af974c96e 100644
--- a/src/devices/ovs/meson.build
+++ b/src/devices/ovs/meson.build
@@ -7,9 +7,9 @@ sources = files(
)
deps = [
- core_dep,
jansson_dep,
- libnmdbus_dep
+ libnmdbus_dep,
+ nm_dep
]
cflags = '-DRUNSTATEDIR="@0@"'.format(nm_runstatedir)
diff --git a/src/devices/team/meson.build b/src/devices/team/meson.build
index 64d6ab334..0853c610d 100644
--- a/src/devices/team/meson.build
+++ b/src/devices/team/meson.build
@@ -4,10 +4,10 @@ sources = files(
)
deps = [
- core_dep,
jansson_dep,
libnmdbus_dep,
- libteamdctl_dep
+ libteamdctl_dep,
+ nm_dep
]
ldflags = []
diff --git a/src/devices/tests/meson.build b/src/devices/tests/meson.build
index 015b2a6fe..c1d6def4e 100644
--- a/src/devices/tests/meson.build
+++ b/src/devices/tests/meson.build
@@ -7,7 +7,7 @@ foreach test_unit: test_units
exe = executable(
test_unit,
test_unit + '.c',
- dependencies: test_core_dep
+ dependencies: test_nm_dep
)
test(test_unit, exe)
diff --git a/src/devices/wifi/meson.build b/src/devices/wifi/meson.build
index 0b681262b..a733b379c 100644
--- a/src/devices/wifi/meson.build
+++ b/src/devices/wifi/meson.build
@@ -17,8 +17,8 @@ if enable_iwd
endif
deps = [
- core_dep,
- libnmdbus_dep
+ libnmdbus_dep,
+ nm_dep
]
ldflags = []
diff --git a/src/devices/wifi/tests/meson.build b/src/devices/wifi/tests/meson.build
index 189c1a730..05db2ffbb 100644
--- a/src/devices/wifi/tests/meson.build
+++ b/src/devices/wifi/tests/meson.build
@@ -3,7 +3,7 @@ test_unit = 'test-general'
exe = executable(
'wifi-' + test_unit,
[test_unit + '.c'] + common_sources,
- dependencies: test_core_dep
+ dependencies: test_nm_dep
)
test(test_unit, exe)
diff --git a/src/devices/wwan/meson.build b/src/devices/wwan/meson.build
index 3f3c70002..e571cf94f 100644
--- a/src/devices/wwan/meson.build
+++ b/src/devices/wwan/meson.build
@@ -5,9 +5,9 @@ sources = files(
)
deps = [
- core_dep,
libsystemd_dep,
- mm_glib_dep
+ mm_glib_dep,
+ nm_dep
]
if enable_ofono
@@ -32,8 +32,8 @@ libnm_wwan = shared_module(
)
libnm_wwan_dep = declare_dependency(
- link_with: libnm_wwan,
- include_directories: include_directories('.')
+ include_directories: include_directories('.'),
+ link_with: libnm_wwan
)
core_plugins += libnm_wwan
diff --git a/src/dhcp/meson.build b/src/dhcp/meson.build
index d4ef4d7a8..c6b67b0ec 100644
--- a/src/dhcp/meson.build
+++ b/src/dhcp/meson.build
@@ -13,8 +13,7 @@ endif
executable(
name,
name + '.c',
- include_directories: core_incs,
- dependencies: glib_dep,
+ dependencies: nm_core_dep,
c_args: cflags,
link_args: ldflags,
link_depends: linker_script_binary,
diff --git a/src/dhcp/tests/meson.build b/src/dhcp/tests/meson.build
index 85c6811bc..0c2c4c805 100644
--- a/src/dhcp/tests/meson.build
+++ b/src/dhcp/tests/meson.build
@@ -9,7 +9,7 @@ foreach test_unit: test_units
exe = executable(
test_unit,
test_unit + '.c',
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: cflags
)
diff --git a/src/dnsmasq/tests/meson.build b/src/dnsmasq/tests/meson.build
index 4c4173faa..0efeec3b3 100644
--- a/src/dnsmasq/tests/meson.build
+++ b/src/dnsmasq/tests/meson.build
@@ -5,7 +5,7 @@ cflags = '-DTESTDIR="@0@"'.format(meson.source_root())
exe = executable(
test_unit,
test_unit + '.c',
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: cflags
)
diff --git a/src/meson.build b/src/meson.build
index 5335fdea0..5d06e6ff7 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -7,28 +7,20 @@ install_data(
subdir('systemd')
-core_cflags = [
+core_plugins = []
+
+nm_cflags = [
'-DG_LOG_DOMAIN="@0@"'.format(nm_name),
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON'
]
-core_incs = [
- top_inc,
- shared_inc,
- libnm_core_inc,
- src_inc
-]
-
-core_dep = declare_dependency(
- sources: libnm_core_enum[1],
- include_directories: core_incs,
- dependencies: glib_dep,
- compile_args: core_cflags
+nm_dep = declare_dependency(
+ include_directories: src_inc,
+ dependencies: nm_core_dep,
+ compile_args: nm_cflags
)
-core_plugins = []
-
-common_cflags = [
+cflags = nm_cflags + [
'-DPREFIX="@0@"'.format(nm_prefix),
'-DBINDIR="@0@"'.format(nm_bindir),
'-DDATADIR="@0@"'.format(nm_datadir),
@@ -47,15 +39,15 @@ common_cflags = [
]
if enable_dhcpcanon
- common_cflags += '-DDHCPCANON_PATH="@0@"'.format(dhcpcanon.path())
+ cflags += '-DDHCPCANON_PATH="@0@"'.format(dhcpcanon.path())
endif
if enable_dhclient
- common_cflags += '-DDHCLIENT_PATH="@0@"'.format(dhclient.path())
+ cflags += '-DDHCLIENT_PATH="@0@"'.format(dhclient.path())
endif
if enable_dhcpcd
- common_cflags += '-DDHCPCD_PATH="@0@"'.format(dhcpcd.path())
+ cflags += '-DDHCPCD_PATH="@0@"'.format(dhcpcd.path())
endif
sources = files(
@@ -82,11 +74,11 @@ sources = files(
)
deps = [
- core_dep,
libnl_dep,
libnmdbus_dep,
libsystemd_dep,
- libudev_dep
+ libudev_dep,
+ nm_core_dep
]
if enable_wext
@@ -97,7 +89,7 @@ libnetwork_manager_base = static_library(
'NetworkManagerBase',
sources: sources,
dependencies: deps,
- c_args: common_cflags,
+ c_args: cflags,
link_with: libnm_core
)
@@ -178,11 +170,14 @@ sources = files(
)
deps = [
- core_dep,
dl_dep,
libndp_dep,
libnl_dep,
- libudev_dep
+ # FIXME: Some files use introspection/dbus* headers, so
+ # this library might be needed
+ #libnmdbus_dep,
+ libudev_dep,
+ nm_core_dep
]
if enable_concheck
@@ -211,7 +206,7 @@ libnetwork_manager = static_library(
'NetworkManager',
sources: sources,
dependencies: deps,
- c_args: common_cflags,
+ c_args: cflags,
link_with: [libnetwork_manager_base, libsystemd_nm]
)
@@ -249,7 +244,7 @@ network_manager = executable(
meson.project_name(),
'main.c',
dependencies: deps,
- c_args: common_cflags,
+ c_args: cflags,
link_with: libnetwork_manager,
link_args: ldflags,
link_depends: symbol_map,
@@ -258,11 +253,11 @@ network_manager = executable(
)
deps = [
- core_dep,
dl_dep,
libndp_dep,
libnl_dep,
- libudev_dep
+ libudev_dep,
+ nm_core_dep
]
ldflags = []
@@ -276,7 +271,7 @@ executable(
name,
name + '.c',
dependencies: deps,
- c_args: common_cflags,
+ c_args: cflags,
link_with: [libnetwork_manager_base, libsystemd_nm],
link_args: ldflags,
link_depends: linker_script_binary,
@@ -292,9 +287,9 @@ if enable_tests
)
deps = [
- core_dep,
libnl_dep,
- libudev_dep
+ libudev_dep,
+ nm_core_dep
]
test_cflags = []
@@ -309,12 +304,12 @@ if enable_tests
'NetworkManagerTest',
sources: sources,
dependencies: deps,
- c_args: test_cflags,
+ c_args: cflags + test_cflags,
link_with: libnetwork_manager
)
- test_core_dep = declare_dependency(
- dependencies: core_dep,
+ test_nm_dep = declare_dependency(
+ dependencies: nm_dep,
compile_args: test_cflags,
link_with: libnetwork_manager_test
)
diff --git a/src/ndisc/tests/meson.build b/src/ndisc/tests/meson.build
index acd5a6ec8..708ecf412 100644
--- a/src/ndisc/tests/meson.build
+++ b/src/ndisc/tests/meson.build
@@ -3,7 +3,7 @@ test_unit = 'test-ndisc-fake'
exe = executable(
test_unit,
test_unit + '.c',
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: test_cflags_platform
)
@@ -14,6 +14,6 @@ test = 'test-ndisc-linux'
exe = executable(
test,
test + '.c',
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: test_cflags_platform
)
diff --git a/src/platform/tests/meson.build b/src/platform/tests/meson.build
index c7c5c855f..6c18241e7 100644
--- a/src/platform/tests/meson.build
+++ b/src/platform/tests/meson.build
@@ -15,7 +15,7 @@ foreach test_unit: test_units
exe = executable(
'platform-' + test_unit[0],
test_unit[1],
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: test_cflags_platform
)
@@ -27,6 +27,6 @@ test = 'monitor'
executable(
test,
test + '.c',
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: test_cflags_platform
)
diff --git a/src/ppp/meson.build b/src/ppp/meson.build
index 36f9d5eb9..94b82e030 100644
--- a/src/ppp/meson.build
+++ b/src/ppp/meson.build
@@ -2,7 +2,7 @@ name = 'nm-pppd-plugin'
deps = [
dl_dep,
- glib_dep
+ nm_core_dep
]
cflags = [
@@ -13,8 +13,8 @@ cflags = [
nm_pppd_plugin = shared_module(
name,
name_prefix: '',
- sources: [name + '.c', libnm_core_enum[1]],
- include_directories: core_incs,
+ sources: name + '.c',
+ include_directories: src_inc,
dependencies: deps,
c_args: cflags,
install: true,
@@ -24,8 +24,8 @@ nm_pppd_plugin = shared_module(
name = 'nm-ppp-plugin'
deps = [
- core_dep,
- libnmdbus_dep
+ libnmdbus_dep,
+ nm_dep
]
cflags = '-DPPPD_PLUGIN_DIR="@0@"'.format(pppd_plugin_dir)
diff --git a/src/settings/plugins/ibft/meson.build b/src/settings/plugins/ibft/meson.build
index 66ed0abe0..12f0acba6 100644
--- a/src/settings/plugins/ibft/meson.build
+++ b/src/settings/plugins/ibft/meson.build
@@ -8,7 +8,7 @@ cflags = [
libnms_ibft_core = static_library(
'nms-ibft-core',
'nms-ibft-reader.c',
- dependencies: core_dep,
+ dependencies: nm_dep,
c_args: cflags
)
@@ -25,7 +25,7 @@ endif
libnm_settings_plugin_ibft = shared_module(
name,
sources: sources,
- dependencies: core_dep,
+ dependencies: nm_dep,
c_args: cflags,
link_with: libnms_ibft_core,
link_args: ldflags,
diff --git a/src/settings/plugins/ibft/tests/meson.build b/src/settings/plugins/ibft/tests/meson.build
index ed5cb3ffc..d57989524 100644
--- a/src/settings/plugins/ibft/tests/meson.build
+++ b/src/settings/plugins/ibft/tests/meson.build
@@ -10,7 +10,7 @@ cflags = [
exe = executable(
test_unit,
test_unit + '.c',
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: cflags,
link_with: libnms_ibft_core
)
diff --git a/src/settings/plugins/ifcfg-rh/meson.build b/src/settings/plugins/ifcfg-rh/meson.build
index f480831a3..2d46fc45d 100644
--- a/src/settings/plugins/ifcfg-rh/meson.build
+++ b/src/settings/plugins/ifcfg-rh/meson.build
@@ -33,8 +33,8 @@ sources = files(
)
deps = [
- core_dep,
- crypto_dep
+ crypto_dep,
+ nm_dep
]
libnms_ifcfg_rh_core = static_library(
diff --git a/src/settings/plugins/ifcfg-rh/tests/meson.build b/src/settings/plugins/ifcfg-rh/tests/meson.build
index 359ed7360..3be38bd3c 100644
--- a/src/settings/plugins/ifcfg-rh/tests/meson.build
+++ b/src/settings/plugins/ifcfg-rh/tests/meson.build
@@ -10,7 +10,7 @@ cflags = [
exe = executable(
test_unit,
test_unit + '.c',
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: cflags,
link_with: libnms_ifcfg_rh_core
)
diff --git a/src/settings/plugins/ifupdown/meson.build b/src/settings/plugins/ifupdown/meson.build
index 6e84951ce..9800f5888 100644
--- a/src/settings/plugins/ifupdown/meson.build
+++ b/src/settings/plugins/ifupdown/meson.build
@@ -4,8 +4,8 @@ sources = files(
)
deps = [
- core_dep,
- libudev_dep
+ libudev_dep,
+ nm_dep
]
cflags = '-DSYSCONFDIR="@0@"'.format(nm_sysconfdir)
diff --git a/src/settings/plugins/ifupdown/tests/meson.build b/src/settings/plugins/ifupdown/tests/meson.build
index 5d416b383..287c89d2e 100644
--- a/src/settings/plugins/ifupdown/tests/meson.build
+++ b/src/settings/plugins/ifupdown/tests/meson.build
@@ -5,7 +5,7 @@ cflags = '-DTEST_ENI_DIR="@0@"'.format(meson.current_source_dir())
exe = executable(
test_unit,
test_unit + '.c',
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: cflags,
link_with: libnms_ifupdown_core
)
diff --git a/src/settings/plugins/keyfile/tests/meson.build b/src/settings/plugins/keyfile/tests/meson.build
index 47a2af1f3..1f32650b2 100644
--- a/src/settings/plugins/keyfile/tests/meson.build
+++ b/src/settings/plugins/keyfile/tests/meson.build
@@ -10,7 +10,7 @@ cflags = [
exe = executable(
test_unit,
test_unit + '.c',
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: cflags
)
diff --git a/src/supplicant/tests/meson.build b/src/supplicant/tests/meson.build
index 357bcb593..87acc7eb5 100644
--- a/src/supplicant/tests/meson.build
+++ b/src/supplicant/tests/meson.build
@@ -3,7 +3,7 @@ test_unit = 'test-supplicant-config'
exe = executable(
test_unit,
test_unit + '.c',
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: '-DTEST_CERT_DIR="@0@"'.format(join_paths(meson.current_source_dir(), 'certs'))
)
diff --git a/src/systemd/meson.build b/src/systemd/meson.build
index 0d9213b29..fe3d88d3b 100644
--- a/src/systemd/meson.build
+++ b/src/systemd/meson.build
@@ -51,9 +51,6 @@ sources = files(
)
incs = [
- top_inc,
- shared_inc,
- libnm_core_inc,
src_inc,
include_directories(
'sd-adapt',
@@ -64,12 +61,10 @@ incs = [
)
]
-cflags = '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD'
-
libsystemd_nm = static_library(
'systemd-nm',
- sources: sources + [libnm_core_enum[1]],
+ sources: sources,
include_directories: incs,
- dependencies: glib_dep,
- c_args: cflags
+ dependencies: nm_core_dep,
+ c_args: '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD'
)
diff --git a/src/tests/config/meson.build b/src/tests/config/meson.build
index f80453ebc..80d289f71 100644
--- a/src/tests/config/meson.build
+++ b/src/tests/config/meson.build
@@ -15,7 +15,7 @@ cflags = [
exe = executable(
test_unit,
sources,
- dependencies: test_core_dep,
+ dependencies: test_nm_dep,
c_args: cflags
)
diff --git a/src/tests/meson.build b/src/tests/meson.build
index 6a8be5585..a0b3eb990 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -15,7 +15,7 @@ foreach test_unit: test_units
exe = executable(
test_unit,
test_unit + '.c',
- dependencies: test_core_dep
+ dependencies: test_nm_dep
)
test(test_unit, exe)
@@ -23,14 +23,12 @@ endforeach
test_unit = 'test-systemd'
-cflags = '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD'
-
exe = executable(
test_unit,
- [test_unit + '.c', libnm_core_enum[1]] + shared_siphash,
- include_directories: core_incs,
- dependencies: glib_dep,
- c_args: cflags,
+ [test_unit + '.c'] + shared_siphash,
+ include_directories: src_inc,
+ dependencies: nm_core_dep,
+ c_args: '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD',
link_with: libsystemd_nm
)
diff --git a/vapi/meson.build b/vapi/meson.build
index 330d05519..835a0b9aa 100644
--- a/vapi/meson.build
+++ b/vapi/meson.build
@@ -1,5 +1,5 @@
gnome.generate_vapi(
- 'libnm',
+ libnm_name,
sources: libnm_gir[0],
packages: 'gio-2.0',
install: true
@@ -12,7 +12,7 @@ if enable_libnm_glib
]
libnm_util_vapi = gnome.generate_vapi(
- 'libnm-util',
+ libnm_util_name,
sources: libnm_util_gir[0],
packages: packages,
install: true
@@ -21,7 +21,7 @@ if enable_libnm_glib
packages += libnm_util_vapi
gnome.generate_vapi(
- 'libnm-glib',
+ libnm_glib_name,
sources: libnm_glib_gir[0],
packages: packages,
install: true
--
2.15.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]