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

Message ID 20190403102545.7143-3-kieran.bingham@ideasonboard.com
State Accepted
Commit d5ca33f6c7b0cd1ca20ec5dc7131aeedf1503080
Headers show
Series
  • Cleanups - for buildroot
Related show

Commit Message

Kieran Bingham April 3, 2019, 10:25 a.m. UTC
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@ideasonboard.com>
---
 src/qcam/meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Laurent Pinchart April 3, 2019, 10:35 a.m. UTC | #1
Hi Kieran,

Thank you for the patch.

On Wed, Apr 03, 2019 at 05:25:45PM +0700, Kieran Bingham wrote:
> 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@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@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,

Patch

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,