[libcamera-devel] [PATCH 2/2] qcam: meson: Use pkg-config method for qt5 dependencies

Kieran Bingham kieran.bingham at ideasonboard.com
Wed Apr 3 12:25:45 CEST 2019


Meson searches for qmake to determine if QT5 is available to support the
optional qcam component.

When cross compiling, meson can incorrectly identify the host qmake
which will cause incorrect linkage and usage of system headers.

Set the dependency method to specify pkg-config which resolves the
issue.

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
 src/qcam/meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/qcam/meson.build b/src/qcam/meson.build
index 8a71cda3dfe5..3d8b1b3b759d 100644
--- a/src/qcam/meson.build
+++ b/src/qcam/meson.build
@@ -8,7 +8,10 @@ qcam_sources = files([
 ])
 
 import('qt5')
-qt5_dep = dependency('qt5', modules: ['Core', 'Gui', 'Widgets'], required : false)
+qt5_dep = dependency('qt5',
+                     method : 'pkg-config',
+                     modules : ['Core', 'Gui', 'Widgets'],
+                     required : false)
 
 if qt5_dep.found()
     qcam  = executable('qcam', qcam_sources,
-- 
2.19.1



More information about the libcamera-devel mailing list