summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2022-12-18 09:11:15 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2022-12-18 09:11:15 +0530
commit0797d89ad75f4a843291aaa2c6d2ad5c7a156a81 (patch)
treeff0366644cfbdc861f74f218adf523a475937480
parentda8aa8352adff2836b1aba5f8a291e5b6e27dd1b (diff)
downloadgdk-pixbuf-0797d89ad75f4a843291aaa2c6d2ad5c7a156a81.tar.gz
meson: Override dependencies to improve usage as a subproject
With this change, gdk-pixbuf can be consumed as a subproject without making any changes to the build files of a project. All you need to do is provide a wrap file with a `[provide]` section: https://mesonbuild.com/Wrap-dependency-system-manual.html#provide-section This is also necessary because otherwise projects need to hard-code the subproject name, which might be `gdk-pixbuf` when using `wrap-git` or `gdk-pixbuf-2.42.10` when using `wrap-file` (to build from a release tarball). This can cause conflicts between different subprojects that consume gdk-pixbuf differently. Other projects like glib, cairo, pango, etc already do this.
-rw-r--r--gdk-pixbuf/meson.build1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
index 54ff9dda3..a11926eee 100644
--- a/gdk-pixbuf/meson.build
+++ b/gdk-pixbuf/meson.build
@@ -272,6 +272,7 @@ gdkpixbuf_dep = declare_dependency(
dependencies: gdk_pixbuf_deps,
sources: [ gdkpixbuf_enum_h, built_girs ],
)
+meson.override_dependency('gdk-pixbuf-2.0', gdkpixbuf_dep)
# Now check if we are building loaders as installed shared modules
# We do this here because shared modules depend on libgdk-pixbuf