mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 11:19:16 +02:00
build/meson: cleanup "libnm-core/meson.build"
This commit is contained in:
parent
bd302341ef
commit
095dce489c
1 changed files with 39 additions and 43 deletions
|
|
@ -8,11 +8,6 @@ libnm_core_nm_default_dep = declare_dependency(
|
||||||
dependencies: glib_nm_default_dep,
|
dependencies: glib_nm_default_dep,
|
||||||
)
|
)
|
||||||
|
|
||||||
common_c_flags = [
|
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
|
|
||||||
]
|
|
||||||
|
|
||||||
libnm_core_headers = files(
|
libnm_core_headers = files(
|
||||||
'nm-connection.h',
|
'nm-connection.h',
|
||||||
'nm-core-types.h',
|
'nm-core-types.h',
|
||||||
|
|
@ -80,10 +75,8 @@ libnm_core_headers = files(
|
||||||
'nm-vpn-plugin-info.h',
|
'nm-vpn-plugin-info.h',
|
||||||
)
|
)
|
||||||
|
|
||||||
enum_types = 'nm-core-enum-types'
|
|
||||||
|
|
||||||
libnm_core_enum_sources = gnome.mkenums_simple(
|
libnm_core_enum_sources = gnome.mkenums_simple(
|
||||||
enum_types,
|
'nm-core-enum-types',
|
||||||
sources: libnm_core_headers + [nm_version_macro_header],
|
sources: libnm_core_headers + [nm_version_macro_header],
|
||||||
identifier_prefix: nm_id_prefix,
|
identifier_prefix: nm_id_prefix,
|
||||||
body_prefix: '#include "nm-default.h"',
|
body_prefix: '#include "nm-default.h"',
|
||||||
|
|
@ -101,7 +94,10 @@ libnm_libnm_core_intern = static_library(
|
||||||
libnm_core_nm_default_dep,
|
libnm_core_nm_default_dep,
|
||||||
libnm_base_dep,
|
libnm_base_dep,
|
||||||
],
|
],
|
||||||
c_args: common_c_flags,
|
c_args: [
|
||||||
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||||
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
libnm_libnm_core_intern_dep = declare_dependency(
|
libnm_libnm_core_intern_dep = declare_dependency(
|
||||||
|
|
@ -114,16 +110,17 @@ libnm_libnm_core_intern_dep = declare_dependency(
|
||||||
link_with: libnm_libnm_core_intern,
|
link_with: libnm_libnm_core_intern,
|
||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
|
||||||
crypto_dep,
|
|
||||||
libnm_glib_aux_dep,
|
|
||||||
]
|
|
||||||
|
|
||||||
libnm_crypto = static_library(
|
libnm_crypto = static_library(
|
||||||
'nm-crypto',
|
'nm-crypto',
|
||||||
sources: 'nm-crypto-@0@.c'.format(crypto),
|
sources: 'nm-crypto-@0@.c'.format(crypto),
|
||||||
dependencies: deps,
|
dependencies: [
|
||||||
c_args: common_c_flags,
|
crypto_dep,
|
||||||
|
libnm_glib_aux_dep,
|
||||||
|
],
|
||||||
|
c_args: [
|
||||||
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||||
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
libnm_core_settings_sources = files(
|
libnm_core_settings_sources = files(
|
||||||
|
|
@ -195,27 +192,24 @@ libnm_core_sources = libnm_core_settings_sources + files(
|
||||||
'nm-vpn-plugin-info.c',
|
'nm-vpn-plugin-info.c',
|
||||||
)
|
)
|
||||||
|
|
||||||
deps = [
|
|
||||||
dl_dep,
|
|
||||||
libnm_systemd_shared_dep,
|
|
||||||
libnm_glib_aux_dep,
|
|
||||||
uuid_dep,
|
|
||||||
]
|
|
||||||
|
|
||||||
links = [
|
|
||||||
libnm_crypto,
|
|
||||||
libnm_libnm_core_intern,
|
|
||||||
]
|
|
||||||
|
|
||||||
libnm_core_c_args = common_c_flags
|
|
||||||
|
|
||||||
libnm_core = static_library(
|
libnm_core = static_library(
|
||||||
'nm-core',
|
'nm-core',
|
||||||
sources: libnm_core_sources + libnm_core_enum_sources + nm_meta_setting_source + [nm_version_macro_header],
|
sources: libnm_core_sources + libnm_core_enum_sources + nm_meta_setting_source + [nm_version_macro_header],
|
||||||
include_directories: top_inc,
|
include_directories: top_inc,
|
||||||
dependencies: deps,
|
dependencies: [
|
||||||
c_args: libnm_core_c_args,
|
dl_dep,
|
||||||
link_with: links,
|
libnm_systemd_shared_dep,
|
||||||
|
libnm_glib_aux_dep,
|
||||||
|
uuid_dep,
|
||||||
|
],
|
||||||
|
c_args: [
|
||||||
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||||
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
|
||||||
|
],
|
||||||
|
link_with: [
|
||||||
|
libnm_crypto,
|
||||||
|
libnm_libnm_core_intern,
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
libnm_core_dep = declare_dependency(
|
libnm_core_dep = declare_dependency(
|
||||||
|
|
@ -225,18 +219,16 @@ libnm_core_dep = declare_dependency(
|
||||||
link_with: libnm_core,
|
link_with: libnm_core,
|
||||||
)
|
)
|
||||||
|
|
||||||
c_flags = [
|
|
||||||
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
|
||||||
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_WITH_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
|
|
||||||
]
|
|
||||||
|
|
||||||
libnm_libnm_core_aux = static_library(
|
libnm_libnm_core_aux = static_library(
|
||||||
'nm-libnm-core-aux',
|
'nm-libnm-core-aux',
|
||||||
sources: files(
|
sources: files(
|
||||||
'nm-libnm-core-aux/nm-libnm-core-aux.c',
|
'nm-libnm-core-aux/nm-libnm-core-aux.c',
|
||||||
) + [libnm_core_enum_sources[1]],
|
) + [libnm_core_enum_sources[1]],
|
||||||
dependencies: libnm_glib_aux_dep,
|
dependencies: libnm_glib_aux_dep,
|
||||||
c_args: c_flags,
|
c_args: [
|
||||||
|
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
|
||||||
|
'-DNETWORKMANAGER_COMPILATION=(NM_NETWORKMANAGER_COMPILATION_WITH_GLIB|NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)',
|
||||||
|
],
|
||||||
link_with: [
|
link_with: [
|
||||||
libnm_libnm_core_intern,
|
libnm_libnm_core_intern,
|
||||||
libnm_base,
|
libnm_base,
|
||||||
|
|
@ -273,10 +265,8 @@ libnm_keyfile_dep = declare_dependency(
|
||||||
link_with: libnm_keyfile,
|
link_with: libnm_keyfile,
|
||||||
)
|
)
|
||||||
|
|
||||||
enums_to_docbook = join_paths(source_root, 'tools', 'enums-to-docbook.pl')
|
|
||||||
|
|
||||||
docbooks = [
|
docbooks = [
|
||||||
['nm-dbus-types', 'nm-dbus-interface.h', 'NetworkManager D-Bus API Types'],
|
['nm-dbus-types', 'nm-dbus-interface.h', 'NetworkManager D-Bus API Types'],
|
||||||
['nm-vpn-dbus-types', 'nm-vpn-dbus-interface.h', 'VPN Plugin D-Bus API Types'],
|
['nm-vpn-dbus-types', 'nm-vpn-dbus-interface.h', 'VPN Plugin D-Bus API Types'],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -288,7 +278,13 @@ foreach docbook: docbooks
|
||||||
input: docbook[1],
|
input: docbook[1],
|
||||||
output: output,
|
output: output,
|
||||||
capture: true,
|
capture: true,
|
||||||
command: [perl, enums_to_docbook, docbook[0], docbook[2], '@INPUT@'],
|
command: [
|
||||||
|
perl,
|
||||||
|
join_paths(source_root, 'tools', 'enums-to-docbook.pl'),
|
||||||
|
docbook[0],
|
||||||
|
docbook[2],
|
||||||
|
'@INPUT@',
|
||||||
|
],
|
||||||
# FIXME: gtkdoc does not depend directly on this.
|
# FIXME: gtkdoc does not depend directly on this.
|
||||||
# https://github.com/mesonbuild/meson/pull/2806
|
# https://github.com/mesonbuild/meson/pull/2806
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue