diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2018-01-07 15:39:42 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-01-10 12:20:17 +0100 |
commit | 5e16bcf268b0a88764c06ecdb0d694cff560d201 (patch) | |
tree | 53adb3607e52fc64e0fbaa821c145f00ad6a8dbd /examples/C | |
parent | 96658d2fd11410b01d11ace62a89899dd7958ee4 (diff) | |
download | NetworkManager-5e16bcf268b0a88764c06ecdb0d694cff560d201.tar.gz |
meson: Improve dependency system
Some targets are missing dependencies on some generated sources in
the meson port. These makes the build to fail due to missing source
files on a highly parallelized build.
These dependencies have been resolved by taking advantage of meson's
internal dependencies which can be used to pass source files,
include directories, libraries and compiler flags.
One of such internal dependencies called `core_dep` was already in
use. However, in order to avoid any confusion with another new
internal dependency called `nm_core_dep`, which is used to include
directories and source files from the `libnm-core` directory, the
`core_dep` dependency has been renamed to `nm_dep`.
These changes have allowed minimizing the build details which are
inherited by using those dependencies. The parallelized build has
also been improved.
Diffstat (limited to 'examples/C')
-rw-r--r-- | examples/C/glib/meson.build | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/examples/C/glib/meson.build b/examples/C/glib/meson.build index c32ebdeed4..0a4694dd52 100644 --- a/examples/C/glib/meson.build +++ b/examples/C/glib/meson.build @@ -1,27 +1,20 @@ 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 |