summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2019-09-11 12:23:26 +0200
committerThomas Haller <thaller@redhat.com>2019-10-01 09:49:33 +0200
commitda40a6597fb37bd49bb1c7b01954de199ffed740 (patch)
tree614e728c6212e6f64be5bba1d08a046d5698d0ff
parent8a5a38f74af38ec4ab25afca21642b593c2dc8e6 (diff)
downloadNetworkManager-da40a6597fb37bd49bb1c7b01954de199ffed740.tar.gz
meson: Improve nmtui and libnmt-newt build
The dependencies used in the build of the `nmtui` executable and the `libnmt-newt` library have been reviewed. The compiler flags used in common by them has also been moved to a `common_c_flags` variable to avoid any confussion.
-rw-r--r--clients/tui/meson.build17
-rw-r--r--clients/tui/newt/meson.build11
2 files changed, 12 insertions, 16 deletions
diff --git a/clients/tui/meson.build b/clients/tui/meson.build
index a93f41b6f7..8948d6ff35 100644
--- a/clients/tui/meson.build
+++ b/clients/tui/meson.build
@@ -1,13 +1,6 @@
name = 'nmtui'
-deps = [
- libnm_nm_default_dep,
- newt_dep,
-]
-
-c_flags = clients_c_flags + [
- '-DG_LOG_DOMAIN="@0@"'.format(name),
-]
+common_c_flags = clients_c_flags + ['-DG_LOG_DOMAIN="@0@"'.format(name)]
subdir('newt')
@@ -54,11 +47,9 @@ sources = files(
'nmt-widget-list.c',
)
-deps += [
- libnm_dep,
- libnmc_dep,
+deps = [
libnmc_base_dep,
- libnm_libnm_core_aux_dep,
+ libnmc_dep,
libnmt_newt_dep,
]
@@ -66,7 +57,7 @@ executable(
name,
sources,
dependencies: deps,
- c_args: c_flags,
+ c_args: common_c_flags,
link_with: libnm_systemd_logging_stub,
link_args: ldflags_linker_script_binary,
link_depends: linker_script_binary,
diff --git a/clients/tui/newt/meson.build b/clients/tui/newt/meson.build
index af32247bd9..d543f7ea6f 100644
--- a/clients/tui/newt/meson.build
+++ b/clients/tui/newt/meson.build
@@ -21,15 +21,20 @@ sources = files(
'nmt-newt-widget.c',
)
+deps = [
+ libnm_nm_default_dep,
+ newt_dep,
+]
+
libnmt_newt = static_library(
'nmt-newt',
- sources: sources + [libnm_enum_sources[1]],
- include_directories: libnm_inc,
+ sources: sources,
dependencies: deps,
- c_args: c_flags,
+ c_args: common_c_flags,
)
libnmt_newt_dep = declare_dependency(
include_directories: include_directories('.'),
+ dependencies: newt_dep,
link_with: libnmt_newt,
)