blob: e46140491835d3d1d0a1e5a9718d057f48b31140 [file] [log] [blame]
Brad Bishop15ae2502019-06-18 21:44:24 -04001From be8a47e0c21e5577d4f5669d339dfec6299b25be Mon Sep 17 00:00:00 2001
Brad Bishop19323692019-04-05 15:28:33 -04002From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 14 Feb 2019 18:06:25 +0100
4Subject: [PATCH] Generate loaders.cache using a native tool when
5 cross-compiling
6
7Otherwise meson would attempt to run a target binary.
8
9Upstream-Status: Pending
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11
12---
Brad Bishop15ae2502019-06-18 21:44:24 -040013 gdk-pixbuf/meson.build | 12 ++++++++++--
14 1 file changed, 10 insertions(+), 2 deletions(-)
Brad Bishop19323692019-04-05 15:28:33 -040015
16diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
Brad Bishop15ae2502019-06-18 21:44:24 -040017index 5cddbec..78c8bd3 100644
Brad Bishop19323692019-04-05 15:28:33 -040018--- a/gdk-pixbuf/meson.build
19+++ b/gdk-pixbuf/meson.build
Brad Bishop15ae2502019-06-18 21:44:24 -040020@@ -324,8 +324,16 @@ if not meson.is_cross_build()
21 build_by_default: true)
22 loaders_dep = declare_dependency(sources: [ loaders_cache ])
23 else
24- loaders_cache = []
25- loaders_dep = declare_dependency()
26+ loaders_cache = custom_target('loaders.cache',
27+ output: 'loaders.cache',
28+ capture: true,
29+ command: [
30+ 'gdk-pixbuf-query-loaders',
31+ dynamic_loaders,
32+ ],
33+ depends: dynamic_loaders_dep,
34+ build_by_default: true)
35+ loaders_dep = declare_dependency(sources: [ loaders_cache ])
36 endif
Brad Bishop19323692019-04-05 15:28:33 -040037
38 pkgconfig = import('pkgconfig')