2020-12-23 22:21:36 +01:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2020-01-14 10:42:24 +01:00
|
|
|
|
2017-11-25 11:39:06 +01:00
|
|
|
common_inc = include_directories('.')
|
|
|
|
|
|
|
|
|
|
libnmc_base = static_library(
|
|
|
|
|
'nmc-base',
|
2021-02-04 14:16:29 +01:00
|
|
|
sources: files(
|
|
|
|
|
'nm-client-utils.c',
|
|
|
|
|
'nm-secret-agent-simple.c',
|
|
|
|
|
'nm-vpn-helpers.c',
|
|
|
|
|
'nm-polkit-listener.c',
|
|
|
|
|
),
|
|
|
|
|
dependencies: [
|
|
|
|
|
libnm_dep,
|
|
|
|
|
libnm_nm_default_dep,
|
|
|
|
|
],
|
|
|
|
|
c_args: [
|
|
|
|
|
'-DG_LOG_DOMAIN="libnmc"',
|
|
|
|
|
],
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
libnmc_base_dep = declare_dependency(
|
2018-01-07 15:39:42 +01:00
|
|
|
include_directories: common_inc,
|
2021-02-04 14:16:29 +01:00
|
|
|
dependencies: [
|
|
|
|
|
libnm_dep,
|
|
|
|
|
libnm_nm_default_dep,
|
|
|
|
|
],
|
2018-10-18 12:50:20 +02:00
|
|
|
link_with: libnmc_base,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
2020-11-01 17:57:33 +01:00
|
|
|
if enable_docs
|
2017-11-25 11:39:06 +01:00
|
|
|
settings_docs_source = custom_target(
|
2021-02-04 14:16:29 +01:00
|
|
|
'settings-docs.h',
|
2020-06-09 18:53:47 +02:00
|
|
|
input: nm_settings_docs_xml_gir,
|
2021-02-04 14:16:29 +01:00
|
|
|
output: 'settings-docs.h',
|
|
|
|
|
command: [
|
|
|
|
|
xsltproc,
|
|
|
|
|
'--output',
|
|
|
|
|
'@OUTPUT@',
|
|
|
|
|
join_paths(meson.current_source_dir(), 'settings-docs.xsl'),
|
|
|
|
|
'@INPUT@',
|
|
|
|
|
],
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
2018-12-06 15:36:55 +01:00
|
|
|
test(
|
|
|
|
|
'check-settings-docs',
|
2020-11-01 18:28:37 +01:00
|
|
|
find_program(join_paths(source_root, 'tools', 'check-compare-generated.sh')),
|
2021-02-04 14:16:29 +01:00
|
|
|
args: [
|
|
|
|
|
source_root,
|
|
|
|
|
build_root,
|
|
|
|
|
'clients/common/settings-docs.h',
|
|
|
|
|
],
|
2018-12-06 15:36:55 +01:00
|
|
|
)
|
2017-11-25 11:39:06 +01:00
|
|
|
else
|
|
|
|
|
settings_docs_source = configure_file(
|
2021-02-04 14:16:29 +01:00
|
|
|
input: 'settings-docs.h.in',
|
2019-08-28 10:40:46 +02:00
|
|
|
output: '@BASENAME@',
|
2018-10-18 12:50:20 +02:00
|
|
|
configuration: configuration_data(),
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
libnmc = static_library(
|
|
|
|
|
'nmc',
|
all: move shared/nm-meta-setting.[hc] to libnm-core and clients
"shared/nm-meta-setting.[hc]" contains meta data about settings.
As such it is similarly used by libnm-core (as internal API) and
by clients (as extension of public API of libnm). However, it must
be compiled twice, because while it defines in both cases a
NMMetaSettingInfo type, these types are different between internal and
public API.
Hence, the files must also be compiled twice (and differently), once
against libnm-core and once against the client helper library.
Previously, the file was under "shared/", but there it's a bit odd
it doesn't clearly belong anywhere.
There are two goals here:
- copy the file to the two places where it is used. We also have
a "check-tree" unit test that ensures those files don't diverge in
the future.
- we no longer require CFLAGS set during built. Instead, the sources
should control the build. For that we have new (simple) headers
"nm-meta-setting-base.h" that define the right behavior for the
impl files.
There is still an ugliness (among several): the files must be named the
same for libnm-core and clients/common. Preferably, all our sources have
unique names, but that is not possible with this scheme (without
introducing other ugliness). To mitigate that, include the files only at
one exact place.
2021-02-07 10:53:44 +01:00
|
|
|
sources: [settings_docs_source] + files(
|
2021-02-04 14:16:29 +01:00
|
|
|
'nm-meta-setting-access.c',
|
all: move shared/nm-meta-setting.[hc] to libnm-core and clients
"shared/nm-meta-setting.[hc]" contains meta data about settings.
As such it is similarly used by libnm-core (as internal API) and
by clients (as extension of public API of libnm). However, it must
be compiled twice, because while it defines in both cases a
NMMetaSettingInfo type, these types are different between internal and
public API.
Hence, the files must also be compiled twice (and differently), once
against libnm-core and once against the client helper library.
Previously, the file was under "shared/", but there it's a bit odd
it doesn't clearly belong anywhere.
There are two goals here:
- copy the file to the two places where it is used. We also have
a "check-tree" unit test that ensures those files don't diverge in
the future.
- we no longer require CFLAGS set during built. Instead, the sources
should control the build. For that we have new (simple) headers
"nm-meta-setting-base.h" that define the right behavior for the
impl files.
There is still an ugliness (among several): the files must be named the
same for libnm-core and clients/common. Preferably, all our sources have
unique names, but that is not possible with this scheme (without
introducing other ugliness). To mitigate that, include the files only at
one exact place.
2021-02-07 10:53:44 +01:00
|
|
|
'nm-meta-setting-base-impl.c',
|
2021-02-04 14:16:29 +01:00
|
|
|
'nm-meta-setting-desc.c',
|
|
|
|
|
),
|
|
|
|
|
dependencies: [
|
|
|
|
|
libnm_dep,
|
|
|
|
|
libnm_nm_default_dep,
|
|
|
|
|
libnm_libnm_core_aux_dep,
|
|
|
|
|
],
|
|
|
|
|
c_args: [
|
|
|
|
|
'-DG_LOG_DOMAIN="libnmc"',
|
|
|
|
|
],
|
2018-10-18 12:50:20 +02:00
|
|
|
link_depends: settings_docs_source,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
libnmc_dep = declare_dependency(
|
2018-01-07 15:39:42 +01:00
|
|
|
include_directories: common_inc,
|
2021-02-04 14:16:29 +01:00
|
|
|
dependencies: [
|
|
|
|
|
libnm_dep,
|
|
|
|
|
libnm_nm_default_dep,
|
|
|
|
|
],
|
2018-10-18 12:50:20 +02:00
|
|
|
link_with: libnmc,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if (enable_introspection or enable_nmtui) and enable_tests
|
|
|
|
|
subdir('tests')
|
|
|
|
|
endif
|