From da40a6597fb37bd49bb1c7b01954de199ffed740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Mart=C3=ADnez?= Date: Wed, 11 Sep 2019 12:23:26 +0200 Subject: [PATCH] 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. --- clients/tui/meson.build | 17 ++++------------- clients/tui/newt/meson.build | 11 ++++++++--- 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, )