blob: 4d3dcd5cedd44d2078037e0f8f8ada4abe681f80 [file] [log] [blame]
Andrew Geissler69721092021-07-23 12:57:00 -04001From 717b0f46b23ddc042da481d1d446bdd1c6c49142 Mon Sep 17 00:00:00 2001
2From: Julien Malik <julien.malik@unseenlabs.fr>
3Date: Mon, 27 Jul 2020 14:34:44 +0200
4Subject: [PATCH] python: Do not verify whether libiio is installed when
5 cross-compiling
6
7This should fix #561
8
9Signed-off-by: Julien Malik <julien.malik@paraiso.me>
10---
11 bindings/python/setup.py.cmakein | 7 +++++++
12 1 file changed, 7 insertions(+)
13
14diff --git a/bindings/python/setup.py.cmakein b/bindings/python/setup.py.cmakein
15index cd14e2e..96d58a8 100644
16--- a/bindings/python/setup.py.cmakein
17+++ b/bindings/python/setup.py.cmakein
18@@ -54,6 +54,13 @@ class InstallWrapper(install):
19 install.run(self)
20
21 def _check_libiio_installed(self):
22+ cross_compiling = ("${CMAKE_CROSSCOMPILING}" == "TRUE")
23+ if cross_compiling:
24+ # When cross-compiling, we generally cannot dlopen
25+ # the libiio shared lib from the build platform.
26+ # Simply skip this check in that case.
27+ return
28+
29 from platform import system as _system
30 from ctypes import CDLL as _cdll
31 from ctypes.util import find_library
32--
332.25.1
34