blob: a3692610207d6a5d111b557e633848370639c673 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Sat, 2 Mar 2024 16:44:19 +0100
Subject: [PATCH] gst-python: fix cross-compiling
When cross-compiling, looking in the root filesystem of the build host to find
the Python library makes no sense. Instead, assume that the directory and file
name provided by Python are correct and use those without checking.
---
meson.build | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/meson.build b/meson.build
index 5cccbcc3b6a5..6bf006367450 100644
--- a/meson.build
+++ b/meson.build
@@ -70,15 +70,19 @@ else
]
endif
pylib_fname = ''
-foreach loc: pylib_locs
- foreach fname: pylib_fnames
- if fsmod.exists(loc / fname)
- pylib_fname = fname
- message(f'PY_LIB_FNAME = @fname@ (@loc@)')
- break
- endif
+if meson.is_cross_build()
+ pylib_fname = pylib_locs[0] / pylib_fnames[0]
+else
+ foreach loc: pylib_locs
+ foreach fname: pylib_fnames
+ if fsmod.exists(loc / fname)
+ pylib_fname = fname
+ message(f'PY_LIB_FNAME = @fname@ (@loc@)')
+ break
+ endif
+ endforeach
endforeach
-endforeach
+endif
if pylib_fname == ''
error_msg = 'Could not find python library to load'
if python_opt.enabled()
|