Commit 619de16f authored by Thomas Haller's avatar Thomas Haller
parents 96658d2f 50930ed1
name = 'nmcli'
# FIXME: nmcli-completion should be renamed to nmcli
install_data(
'nmcli-completion',
......@@ -16,23 +18,17 @@ sources = files(
'utils.c'
)
incs = [
top_inc,
shared_inc,
libnm_core_inc
]
deps = [
glib_dep,
libnm_dep,
libnmc_dep,
libnmc_base_dep,
libnmc_dep,
nm_core_dep,
readline_dep
]
cflags = clients_cflags + [
'-DG_LOG_DOMAIN="nmcli"',
'-DNMCLI_LOCALEDIR="@0@"'.format(nm_localedir),
'-DG_LOG_DOMAIN="@0@"'.format(name),
'-DNMCLI_LOCALEDIR="@0@"'.format(nm_localedir)
]
ldflags = []
......@@ -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,
......
......@@ -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 = clients_cflags + [
......@@ -25,15 +19,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: 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(
......@@ -71,8 +64,7 @@ sources += settings_docs_source
libnmc = static_library(
'nmc',
sources: sources + [libnm_core_enum[1]],
include_directories: incs,
sources: sources,
dependencies: deps,
c_args: cflags,
link_with: libnmc_base,
......@@ -80,8 +72,8 @@ libnmc = static_library(
)
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
......
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: clients_cflags + [
'-DNETWORKMANAGER_COMPILATION_TEST',
......
name = 'nm-online'
incs = [
top_inc,
shared_inc,
libnm_core_inc
]
deps = [
glib_dep,
libnm_dep
libnm_dep,
nm_core_dep
]
clients_cflags = [
......@@ -27,8 +21,7 @@ endif
executable(
name,
[name + '.c', libnm_core_enum[1]],
include_directories: incs,
name + '.c',
dependencies: deps,
c_args: cflags,
link_args: ldflags,
......
incs = [
top_inc,
shared_inc,
libnm_core_inc,
libnm_inc,
]
name = 'nmtui'
deps = [
glib_dep,
newt_dep
newt_dep,
nm_core_dep
]
cflags = clients_cflags + [
'-DG_LOG_DOMAIN="nmtui"',
'-DLOCALEDIR="@0@"'.format(nm_localedir),
'-DG_LOG_DOMAIN="@0@"'.format(name),
'-DLOCALEDIR="@0@"'.format(nm_localedir)
]
subdir('newt')
......@@ -72,9 +67,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,
......
......@@ -23,13 +23,13 @@ sources = files(
libnmt_newt = static_library(
'nmt-newt',
sources: sources + [libnm_core_enum[1]],
include_directories: incs,
sources: sources + [libnm_enum[1]],
include_directories: libnm_inc,
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
)
......@@ -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 = [
......@@ -47,7 +41,6 @@ cflags = [
libnm_dispatcher_core = static_library(
name + '-core',
sources: sources,
include_directories: incs,
dependencies: deps,
c_args: cflags
)
......@@ -69,7 +62,6 @@ endif
executable(
name,
sources,
include_directories: incs,
dependencies: deps,
c_args: cflags,
link_with: libnm_dispatcher_core,
......
test_unit = 'test-dispatcher-envp'
incs = [
top_inc,
shared_inc,
libnm_core_inc,
libnm_inc,
dispatcher_inc
dispatcher_inc,
libnm_inc
]
cflags = [
......@@ -16,9 +13,9 @@ cflags = [
exe = executable(
test_unit,
[test_unit + '.c', libnm_core_enum[1]],
test_unit + '.c',
include_directories: incs,
dependencies: glib_dep,
dependencies: nm_core_dep,
c_args: cflags,
link_with: libnm_dispatcher_core
)
......
doc_module = 'NetworkManager'
doc_module = nm_name
settings = 'settings-spec'
output = settings + '.xml'
......
doc_module = 'libnm-glib'
doc_module = libnm_glib_name
private_headers = [
'common.h',
......
doc_module = 'libnm-util'
doc_module = libnm_util_name
private_headers = [
'crypto.h',
......
doc_module = 'libnm'
doc_module = libnm_name
private_headers = [
'common.h',
......
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', [], []]
]
incs = [
top_inc,
shared_inc,
libnm_core_inc,
libnm_inc
['add-connection-gdbus', [libnm_enum[1]], [libnm_inc], [uuid_dep]],
['add-connection-libnm', [], [], [libnm_dep]],
['get-active-connections-gdbus', [libnm_enum[1]], [libnm_inc], []],
['get-ap-info-libnm', [], [], [libnm_dep]],
['list-connections-gdbus', [], [], []],
['list-connections-libnm', [], [], [libnm_dep]],
['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],
[example[0] + '.c'] + example[1],
include_directories: example[2],
dependencies: [nm_core_dep] + example[3],
c_args: '-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE'
)
endforeach
......@@ -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
)
......@@ -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_LIBNM_CORE',
'-DLIBEXECDIR="@0@"'.format(nm_libexecdir),
'-DLOCALEDIR="@0@"'.format(nm_localedir),
......@@ -158,11 +153,16 @@ endif
libnm_core = static_library(
'nm-core',
sources: libnm_core_sources + libnm_core_enum + shared_sources + [version_header],
include_directories: incs,
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 = [
......
......@@ -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 = [
......@@ -45,8 +39,7 @@ foreach test_unit: test_units
exe = executable(
'libnm-core-' + test_unit,
[test_unit + '.c'] + enum,
include_directories: incs,
dependencies: glib_dep,
dependencies: nm_core_dep,
c_args: cflags,
link_with: libnm_core
)
......
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 = [
......@@ -16,11 +13,9 @@ common_cflags = [
]
cflags = common_cflags + [
'-DG_LOG_DOMAIN="libnm-glib"',
'-DG_LOG_DOMAIN="@0@"'.format(libnm_glib_name)
]
libnm_glib_inc = include_directories('.')
vpn_headers = files(
'nm-vpn-plugin.h',
'nm-vpn-plugin-ui-interface.h',
......@@ -62,15 +57,13 @@ 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]
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 + [
'-Wno-deprecated-declarations',
......@@ -116,9 +109,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: cflags,
link_args: ldflags,
......@@ -127,17 +119,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}'
)
......@@ -197,8 +189,8 @@ libnm_glib_enum = gnome.mkenums(
)
deps = common_deps + [
libudev_dep,
libnm_util_dep
libnm_util_dep,
libudev_dep
]
symbol_map = join_paths(meson.current_source_dir(), 'libnm-glib.ver')
......@@ -210,9 +202,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 + [
'-DNMRUNDIR="@0@"'.format(nm_pkgrundir),
......@@ -224,17 +215,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}'
)
......@@ -261,7 +252,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: cflags + [
'--include-uninstalled=' + libnm_util_gir[0].full_path(),
......@@ -270,21 +261,20 @@ if enable_introspection
)
endif
name = 'libnm-glib-test'
name = libnm_glib_name + '-test'
deps = common_deps + [libnm_util_dep]
executable(
name,
[name + '.c', libnm_utils_enum[1]],
include_directories: common_incs,
name + '.c',
dependencies: deps,
c_args: cflags,
link_with: libnm_glib
)
run_target(
'check-local-exports-libnm-glib',
'check-local-exports-' + libnm_glib_name,
command: [check_exports, libnm_glib.full_path(), symbol_map],
depends: libnm_glib
)
......
incs = [
top_inc,
shared_inc
]
deps = [
dbus_dep,
dbus_glib_dep,
glib_dep,
libnm_glib_dep,
libnm_util_dep
libnm_util_dep,
shared_dep
]
test_units = [
......@@ -19,8 +14,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: common_cflags + [
'-DNETWORKMANAGER_COMPILATION_TEST',
......
......@@ -91,16 +91,11 @@ 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
]
......@@ -110,7 +105,7 @@ common_cflags = [
]
cflags = common_cflags + [
'-DG_LOG_DOMAIN="libnm-util"',
'-DG_LOG_DOMAIN="@0@"'.format(libnm_util_name)
]
symbol_map = join_paths(meson.current_source_dir(), 'libnm-util.ver')
......@@ -124,7 +119,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,
......@@ -133,16 +127,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}'
......@@ -163,19 +158,19 @@ 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
run_target(
'check-local-exports-libnm-util',
'check-local-exports-' + libnm_util_name,
command: [check_exports, libnm_util.full_path(), symbol_map],
depends: libnm_util
)
......@@ -187,13 +182,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
)
......
incs = [
top_inc,
shared_inc
]
deps = [
dbus_dep,
dbus_glib_dep,
glib_dep,
libnm_util_dep
libnm_util_dep,
shared_dep
]
cflags = common_cflags + [
......@@ -20,8 +15,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
)
......@@ -38,8 +32,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],
......
......@@ -6,21 +6,15 @@ if have_fake_typelibs
subdir('fake-typelib')
endif
incs = [
top_inc,