From ffddc060497ee11d6cc573dae01a528b357b91ec Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 24 Mar 2021 19:03:52 +0100 Subject: [PATCH] Add option to set modules installation destination Otherwise it's not possible to install it in non-system location, for example in /app when the system gdk-pixbuf is using /usr. --- meson.build | 5 ++++- meson_options.txt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index b3a2662..0317b4b 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,9 @@ project('webp-pixbuf-loader', 'c') gdkpb = dependency('gdk-pixbuf-2.0', version: '>2.22.0', method: 'pkg-config') -gdk_pb_moddir = gdkpb.get_pkgconfig_variable('gdk_pixbuf_moduledir') +gdk_pb_moddir = get_option('gdk_pixbuf_moduledir') +if gdk_pb_moddir == '' + gdk_pb_moddir = gdkpb.get_pkgconfig_variable('gdk_pixbuf_moduledir') +endif gdk_pb_query_loaders = gdkpb.get_pkgconfig_variable('gdk_pixbuf_query_loaders') webp = dependency('libwebp', version: '>0.4.3') diff --git a/meson_options.txt b/meson_options.txt index c3ca6a4..572de27 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,2 @@ option('gdk_pixbuf_query_loaders_path', type: 'string', description: 'A non default path for the gdk-pixbuf-query-loaders binary') +option('gdk_pixbuf_moduledir', type: 'string', description: 'The path to install gdk-pixbuf modules into')