summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2018-01-07 15:39:42 +0100
committerThomas Haller <thaller@redhat.com>2018-01-10 12:20:17 +0100
commiteb9dcc05e18231113e2c2284eaca711bbada3376 (patch)
tree53adb3607e52fc64e0fbaa821c145f00ad6a8dbd /examples
parent8d27e0c9a695ecdbb2bacb7759f92f94b186dfcb (diff)
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')
-rw-r--r--examples/C/glib/meson.build29
1 files changed, 11 insertions, 18 deletions
diff --git a/examples/C/glib/meson.build b/examples/C/glib/meson.build
index c32ebdeed..0a4694dd5 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