Commit 052734a8 authored by Thomas Haller's avatar Thomas Haller

build/meson: cleanup of libnm/meson.build

"libnm/fake-typelib/meson.build" modifies the variable "sources",
which is defined by the outer "libnm/meson.build" file.

That is confusing. If a variable is not only used within one "meson.build"
file alone, it should have a unique name. Rename the variable to
"libnm_utils_sources".

Also avoid local variable "deps" which is only used at one place.
parent 708f8105
......@@ -20,7 +20,7 @@ endforeach
resource = 'typelibs'
sources += gnome.compile_resources(
libnm_utils_sources += gnome.compile_resources(
resource,
resource + '.gresource.xml',
source_dir: '.',
......
libnm_inc = include_directories('.')
sources = files('nm-libnm-utils.c')
cflags = [
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM',
]
libnm_utils_sources = files('nm-libnm-utils.c')
deps = [
libnmdbus_dep,
shared_nm_utils_base_dep,
]
cflags = [
'-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM',
]
if have_fake_typelibs
deps += gir_dep
subdir('fake-typelib')
......@@ -19,7 +19,7 @@ endif
libnm_utils = static_library(
'nm-utils',
sources: sources,
sources: libnm_utils_sources,
include_directories: libnm_core_inc,
dependencies: deps,
c_args: cflags,
......@@ -146,14 +146,6 @@ libnm_sources = files(
'nm-wimax-nsp.c',
)
deps = [
dl_dep,
libudev_dep,
shared_nm_utils_base_dep,
uuid_dep,
libnm_systemd_shared_no_logging_dep,
]
linker_script = join_paths(meson.current_source_dir(), 'libnm.ver')
......@@ -162,7 +154,13 @@ libnm = shared_library(
sources: libnm_sources + libnm_enum,
version: libnm_version,
include_directories: libnm_core_inc,
dependencies: deps,
dependencies: [
dl_dep,
libudev_dep,
shared_nm_utils_base_dep,
uuid_dep,
libnm_systemd_shared_no_logging_dep,
],
c_args: cflags,
link_with: libnm_utils,
link_whole: libnm_core,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment