summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.com>2019-10-17 16:32:34 +0300
committerPekka Paalanen <pekka.paalanen@collabora.com>2019-10-24 13:29:33 +0300
commit9adfe7b91cf7fe97d0bbc117b0d8b6e643c1ee9f (patch)
tree4a2090bf1718aec66124dd640fadfcc2486993f0
parent20b092d8b478b4d2f8850a772594a2c4457b2a35 (diff)
downloadweston-9adfe7b91cf7fe97d0bbc117b0d8b6e643c1ee9f.tar.gz
weston-9adfe7b91cf7fe97d0bbc117b0d8b6e643c1ee9f.tar.bz2
weston-9adfe7b91cf7fe97d0bbc117b0d8b6e643c1ee9f.zip
build: reduce sub-dependencies of libweston
Make the libweston dependency objects pull in only those secondary dependencies that are actually used in the API. This way in-tree users of libweston link to fewer libraries needlessly, and it matches better what external users get via pkg-config. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-rw-r--r--libweston/meson.build22
1 files changed, 14 insertions, 8 deletions
diff --git a/libweston/meson.build b/libweston/meson.build
index 0f715f26..8dbb625d 100644
--- a/libweston/meson.build
+++ b/libweston/meson.build
@@ -82,31 +82,37 @@ lib_weston = shared_library(
dependencies: deps_libweston
)
+deps_for_libweston_users = [
+ dep_wayland_server,
+ dep_pixman,
+ dep_xkbcommon,
+]
+
# For external users, like Weston.
dep_libweston_public = declare_dependency(
link_with: lib_weston,
include_directories: public_inc,
- dependencies: deps_libweston
+ dependencies: deps_for_libweston_users
)
# For internal users, like the backends.
dep_libweston_private = declare_dependency(
link_with: lib_weston,
include_directories: [ include_directories('.'), public_inc ],
- dependencies: deps_libweston
+ dependencies: deps_for_libweston_users
)
# XXX: We should be able to use dep_libweston_private.partial_dependency() instead
# of this, but a Meson bug makes it not work. It will be fixed with
# https://github.com/mesonbuild/meson/pull/5167
# in hopefully Meson 0.51.
+dep_libweston_private_h_deps = []
+foreach d : deps_for_libweston_users
+ dep_libweston_private_h_deps += d.partial_dependency(compile_args: true)
+endforeach
dep_libweston_private_h = declare_dependency(
include_directories: [ include_directories('.'), public_inc ],
- dependencies: [
- dep_pixman.partial_dependency(compile_args: true),
- dep_xkbcommon.partial_dependency(compile_args: true),
- dep_wayland_server.partial_dependency(compile_args: true)
- ]
+ dependencies: dep_libweston_private_h_deps
)
pkgconfig.generate(
@@ -115,7 +121,7 @@ pkgconfig.generate(
name: 'libweston API',
version: version_weston,
description: 'Header files for libweston compositors development',
- requires_private: [ dep_wayland_server, dep_pixman, dep_xkbcommon ],
+ requires_private: deps_for_libweston_users,
subdirs: dir_include_libweston
)