summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0005-msdk-fix-includedir-path.patch
blob: 273b45bd49eaa399b44ad9f0d16192baf6b18ee5 (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
From e31f68c46ff0c29fa3c22755f18d5dde87b23bf2 Mon Sep 17 00:00:00 2001
From: Naveen Saini <naveen.kumar.saini@intel.com>
Date: Wed, 30 Dec 2020 16:37:47 +0800
Subject: [PATCH] msdk: fix includedir path

In cross compilation, need to prepend PKG_CONFIG_SYSROOT_DIR to the dir path.

Upstream-Status: Inappropriate [OE-specific]

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>

---
 sys/msdk/meson.build | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/msdk/meson.build b/sys/msdk/meson.build
index 24aabc7..6003bb7 100644
--- a/sys/msdk/meson.build
+++ b/sys/msdk/meson.build
@@ -46,7 +46,9 @@ if mfx_api != 'oneVPL'
   mfx_dep = dependency('libmfx', version: ['>= 1.0', '<= 1.99'], required: false)
 
   if mfx_dep.found()
+    pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
     mfx_incdir = mfx_dep.get_variable('includedir')
+    mfx_incdir = pkgconf_sysroot +  mfx_incdir
     mfx_inc = []
     use_msdk = true
   else
@@ -75,7 +77,9 @@ if not use_msdk and mfx_api != 'MSDK'
   mfx_dep = dependency('vpl', version: '>= 2.2', required: false)
 
   if mfx_dep.found()
+    pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
     mfx_incdir = mfx_dep.get_variable('includedir')
+    mfx_incdir = pkgconf_sysroot +  mfx_incdir
     mfx_inc = []
     use_onevpl = true
   endif