From bfa8323368806c9a767744afa7bd69c83547de48 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Mon, 9 Nov 2020 17:23:22 +0100
Subject: [PATCH] meson: support installing to a different prefix

In case the install prefix is different to the gdk-pixbuf one (like is the
case during distro packaging in some cases) it would install the files
to the old prefix.

Fix this by passing the new prefix to pkg-config.
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index f86aa25..cdf2cde 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
 project('jp2-pixbuf-loader', 'c')
 gdk_pixbuf = dependency('gdk-pixbuf-2.0', method: 'pkg-config')
-gdk_pixbuf_moduledir = gdk_pixbuf.get_pkgconfig_variable('gdk_pixbuf_moduledir')
+gdk_pixbuf_moduledir = gdk_pixbuf.get_pkgconfig_variable('gdk_pixbuf_moduledir', define_variable: ['prefix', get_option('prefix')])
 gdk_pixbuf_query_loaders = gdk_pixbuf.get_pkgconfig_variable('gdk_pixbuf_query_loaders')
 gdk_pixbuf_query_loaders = find_program(get_option('gdk_pixbuf_query_loaders_path'), gdk_pixbuf_query_loaders, gdk_pixbuf_query_loaders+'-32', gdk_pixbuf_query_loaders+'-64')
 
-- 
2.29.2

