build/meson: cleanup clients/***/meson.build
This commit is contained in:
@@ -27,7 +27,10 @@ executable(
|
||||
readline_dep,
|
||||
libnm_libnm_aux_dep,
|
||||
],
|
||||
c_args: clients_c_flags + ['-DG_LOG_DOMAIN="@0@"'.format('nmcli')],
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="nmcli"',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
],
|
||||
link_args: ldflags_linker_script_binary,
|
||||
link_depends: linker_script_binary,
|
||||
install: true,
|
||||
@@ -45,7 +48,10 @@ generate_docs_nm_settings_nmcli = executable(
|
||||
libnmc_dep,
|
||||
libnm_libnm_aux_dep,
|
||||
],
|
||||
c_args: clients_c_flags + ['-DG_LOG_DOMAIN="@0@"'.format('nmcli')],
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="nmcli"',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
],
|
||||
link_args: ldflags_linker_script_binary,
|
||||
link_depends: linker_script_binary,
|
||||
)
|
||||
@@ -61,7 +67,11 @@ if enable_docs
|
||||
test(
|
||||
'check-local-generate-docs-nm-settings-nmcli',
|
||||
find_program(join_paths(source_root, 'tools', 'check-compare-generated.sh')),
|
||||
args: [source_root, build_root, 'clients/cli/generate-docs-nm-settings-nmcli.xml'],
|
||||
args: [
|
||||
source_root,
|
||||
build_root,
|
||||
'clients/cli/generate-docs-nm-settings-nmcli.xml',
|
||||
],
|
||||
)
|
||||
else
|
||||
settings_docs_source = configure_file(
|
||||
|
@@ -1,7 +1,5 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
name = 'nm-cloud-setup'
|
||||
|
||||
if install_systemdunitdir
|
||||
|
||||
nm_cloud_setup_service = configure_file(
|
||||
@@ -23,7 +21,9 @@ if install_systemdunitdir
|
||||
|
||||
endif
|
||||
|
||||
sources = files(
|
||||
executable(
|
||||
'nm-cloud-setup',
|
||||
files(
|
||||
'main.c',
|
||||
'nm-cloud-setup-utils.c',
|
||||
'nm-http-client.c',
|
||||
@@ -31,19 +31,17 @@ sources = files(
|
||||
'nmcs-provider-gcp.c',
|
||||
'nmcs-provider-azure.c',
|
||||
'nmcs-provider.c',
|
||||
)
|
||||
|
||||
executable(
|
||||
name,
|
||||
sources,
|
||||
),
|
||||
dependencies: [
|
||||
libnmc_base_dep,
|
||||
libnmc_dep,
|
||||
libcurl_dep,
|
||||
libnm_libnm_aux_dep,
|
||||
],
|
||||
c_args: clients_c_flags +
|
||||
['-DG_LOG_DOMAIN="@0@"'.format(name)],
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="nm-cloud-setup"',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
],
|
||||
link_with: libnm_systemd_logging_stub,
|
||||
link_args: ldflags_linker_script_binary,
|
||||
link_depends: linker_script_binary,
|
||||
|
@@ -2,72 +2,88 @@
|
||||
|
||||
common_inc = include_directories('.')
|
||||
|
||||
common_deps = [
|
||||
libnm_dep,
|
||||
libnm_nm_default_dep,
|
||||
]
|
||||
|
||||
common_c_flags = clients_c_flags + ['-DG_LOG_DOMAIN="libnmc"']
|
||||
|
||||
sources = files(
|
||||
libnmc_base = static_library(
|
||||
'nmc-base',
|
||||
sources: files(
|
||||
'nm-client-utils.c',
|
||||
'nm-secret-agent-simple.c',
|
||||
'nm-vpn-helpers.c',
|
||||
'nm-polkit-listener.c',
|
||||
)
|
||||
|
||||
libnmc_base = static_library(
|
||||
'nmc-base',
|
||||
sources: sources,
|
||||
dependencies: common_deps,
|
||||
c_args: common_c_flags,
|
||||
),
|
||||
dependencies: [
|
||||
libnm_dep,
|
||||
libnm_nm_default_dep,
|
||||
],
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="libnmc"',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
],
|
||||
)
|
||||
|
||||
libnmc_base_dep = declare_dependency(
|
||||
include_directories: common_inc,
|
||||
dependencies: common_deps,
|
||||
dependencies: [
|
||||
libnm_dep,
|
||||
libnm_nm_default_dep,
|
||||
],
|
||||
link_with: libnmc_base,
|
||||
)
|
||||
|
||||
settings_docs = 'settings-docs.h'
|
||||
|
||||
if enable_docs
|
||||
settings_docs_source = custom_target(
|
||||
settings_docs,
|
||||
'settings-docs.h',
|
||||
input: nm_settings_docs_xml_gir,
|
||||
output: settings_docs,
|
||||
command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), 'settings-docs.xsl'), '@INPUT@'],
|
||||
output: 'settings-docs.h',
|
||||
command: [
|
||||
xsltproc,
|
||||
'--output',
|
||||
'@OUTPUT@',
|
||||
join_paths(meson.current_source_dir(), 'settings-docs.xsl'),
|
||||
'@INPUT@',
|
||||
],
|
||||
)
|
||||
|
||||
test(
|
||||
'check-settings-docs',
|
||||
find_program(join_paths(source_root, 'tools', 'check-compare-generated.sh')),
|
||||
args: [source_root, build_root, 'clients/common/' + settings_docs],
|
||||
args: [
|
||||
source_root,
|
||||
build_root,
|
||||
'clients/common/settings-docs.h',
|
||||
],
|
||||
)
|
||||
else
|
||||
settings_docs_source = configure_file(
|
||||
input: settings_docs + '.in',
|
||||
input: 'settings-docs.h.in',
|
||||
output: '@BASENAME@',
|
||||
configuration: configuration_data(),
|
||||
)
|
||||
endif
|
||||
|
||||
sources = nm_meta_setting_source + [settings_docs_source] + files(
|
||||
'nm-meta-setting-access.c',
|
||||
'nm-meta-setting-desc.c',
|
||||
)
|
||||
|
||||
libnmc = static_library(
|
||||
'nmc',
|
||||
sources: sources,
|
||||
dependencies: common_deps + [libnm_libnm_core_aux_dep],
|
||||
c_args: common_c_flags,
|
||||
sources: nm_meta_setting_source + [settings_docs_source] + files(
|
||||
'nm-meta-setting-access.c',
|
||||
'nm-meta-setting-desc.c',
|
||||
),
|
||||
dependencies: [
|
||||
libnm_dep,
|
||||
libnm_nm_default_dep,
|
||||
libnm_libnm_core_aux_dep,
|
||||
],
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="libnmc"',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
],
|
||||
link_depends: settings_docs_source,
|
||||
)
|
||||
|
||||
libnmc_dep = declare_dependency(
|
||||
include_directories: common_inc,
|
||||
dependencies: common_deps,
|
||||
dependencies: [
|
||||
libnm_dep,
|
||||
libnm_nm_default_dep,
|
||||
],
|
||||
link_with: libnmc,
|
||||
)
|
||||
|
||||
|
@@ -1,45 +1,41 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
common_c_flags = clients_c_flags + ['-DNETWORKMANAGER_COMPILATION_TEST']
|
||||
|
||||
test_name = 'test-clients-common'
|
||||
|
||||
deps = [
|
||||
exe = executable(
|
||||
'test-clients-common',
|
||||
'test-clients-common.c',
|
||||
dependencies: [
|
||||
libnmc_base_dep,
|
||||
libnmc_dep,
|
||||
]
|
||||
|
||||
exe = executable(
|
||||
test_name,
|
||||
test_name + '.c',
|
||||
dependencies: deps,
|
||||
c_args: common_c_flags,
|
||||
],
|
||||
c_args: [
|
||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
],
|
||||
)
|
||||
|
||||
test(
|
||||
'clients/common/tests/' + test_name,
|
||||
'clients/common/tests/test-clients-common',
|
||||
test_script,
|
||||
args: test_args + [exe.full_path()],
|
||||
)
|
||||
|
||||
test_name = 'test-libnm-core-aux'
|
||||
|
||||
deps = [
|
||||
exe = executable(
|
||||
'test-libnm-core-aux',
|
||||
'test-libnm-core-aux.c',
|
||||
dependencies: [
|
||||
libnm_dep,
|
||||
libnm_libnm_core_aux_dep,
|
||||
libnm_nm_default_dep,
|
||||
]
|
||||
|
||||
exe = executable(
|
||||
test_name,
|
||||
test_name + '.c',
|
||||
dependencies: deps,
|
||||
c_args: common_c_flags,
|
||||
],
|
||||
c_args: [
|
||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
],
|
||||
link_with: libnm_systemd_logging_stub,
|
||||
)
|
||||
|
||||
test(
|
||||
'clients/common/tests/' + test_name,
|
||||
'clients/common/tests/test-libnm-core-aux',
|
||||
test_script,
|
||||
args: test_args + [exe.full_path()]
|
||||
)
|
||||
|
@@ -1,18 +1,17 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
clients_c_flags = ['-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT']
|
||||
|
||||
name = 'nm-online'
|
||||
|
||||
executable(
|
||||
name,
|
||||
name + '.c',
|
||||
'nm-online',
|
||||
'nm-online' + '.c',
|
||||
dependencies: [
|
||||
libnm_dep,
|
||||
libnm_nm_default_dep,
|
||||
libnm_libnm_aux_dep,
|
||||
],
|
||||
c_args: clients_c_flags + ['-DG_LOG_DOMAIN="@0@"'.format(name)],
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="nm-online"',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
],
|
||||
link_args: ldflags_linker_script_binary,
|
||||
link_depends: linker_script_binary,
|
||||
install: true,
|
||||
|
@@ -1,12 +1,10 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
name = 'nmtui'
|
||||
|
||||
common_c_flags = clients_c_flags + ['-DG_LOG_DOMAIN="@0@"'.format(name)]
|
||||
|
||||
subdir('newt')
|
||||
|
||||
sources = files(
|
||||
executable(
|
||||
'nmtui',
|
||||
files(
|
||||
'nm-editor-bindings.c',
|
||||
'nm-editor-utils.c',
|
||||
'nmt-address-list.c',
|
||||
@@ -47,20 +45,17 @@ sources = files(
|
||||
'nmtui-hostname.c',
|
||||
'nmt-utils.c',
|
||||
'nmt-widget-list.c',
|
||||
)
|
||||
|
||||
deps = [
|
||||
),
|
||||
dependencies: [
|
||||
libnmc_base_dep,
|
||||
libnmc_dep,
|
||||
libnmt_newt_dep,
|
||||
libnm_libnm_aux_dep,
|
||||
]
|
||||
|
||||
executable(
|
||||
name,
|
||||
sources,
|
||||
dependencies: deps,
|
||||
c_args: common_c_flags,
|
||||
],
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="nmtui"',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
],
|
||||
link_with: libnm_systemd_logging_stub,
|
||||
link_args: ldflags_linker_script_binary,
|
||||
link_depends: linker_script_binary,
|
||||
|
@@ -1,6 +1,8 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
sources = files(
|
||||
libnmt_newt = static_library(
|
||||
'nmt-newt',
|
||||
sources: files(
|
||||
'nmt-newt-button-box.c',
|
||||
'nmt-newt-button.c',
|
||||
'nmt-newt-checkbox.c',
|
||||
@@ -21,18 +23,15 @@ sources = files(
|
||||
'nmt-newt-toggle-button.c',
|
||||
'nmt-newt-utils.c',
|
||||
'nmt-newt-widget.c',
|
||||
)
|
||||
|
||||
deps = [
|
||||
),
|
||||
dependencies: [
|
||||
libnm_nm_default_dep,
|
||||
newt_dep,
|
||||
]
|
||||
|
||||
libnmt_newt = static_library(
|
||||
'nmt-newt',
|
||||
sources: sources,
|
||||
dependencies: deps,
|
||||
c_args: common_c_flags,
|
||||
],
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="nmtui"',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
|
||||
],
|
||||
)
|
||||
|
||||
libnmt_newt_dep = declare_dependency(
|
||||
|
Reference in New Issue
Block a user