mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00

(From OE-Core rev: 160a088fbe19d0b3c65040b9bc04cc8bdd3d0d24) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
34 lines
1.5 KiB
Diff
34 lines
1.5 KiB
Diff
From 17117c2732c33ebec39e3fec2ecd5a3515dc7d71 Mon Sep 17 00:00:00 2001
|
|
From: Ross Burton <ross.burton@arm.com>
|
|
Date: Wed, 20 Nov 2024 13:09:38 +0000
|
|
Subject: [PATCH] dependencies/dev: prepend sysroot when searching for GTest
|
|
sources
|
|
|
|
Don't hardcode paths in /usr when looking for the GTest sources, as in
|
|
cross-compile or other builds with a sysroot this will find the host
|
|
sources, not ones that we want to use in the sysroot.
|
|
|
|
Closes #12690.
|
|
|
|
Upstream-Status: Backport [17117c2732c33ebec39e3fec2ecd5a3515dc7d71]
|
|
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
|
---
|
|
mesonbuild/dependencies/dev.py | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
|
|
index 2725a7bb4e88..0c8886b81a04 100644
|
|
--- a/mesonbuild/dependencies/dev.py
|
|
+++ b/mesonbuild/dependencies/dev.py
|
|
@@ -56,7 +56,9 @@ class GTestDependencySystem(SystemDependency):
|
|
def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.Any]) -> None:
|
|
super().__init__(name, environment, kwargs, language='cpp')
|
|
self.main = kwargs.get('main', False)
|
|
- self.src_dirs = ['/usr/src/gtest/src', '/usr/src/googletest/googletest/src']
|
|
+
|
|
+ sysroot = environment.properties[self.for_machine].get_sys_root() or ''
|
|
+ self.src_dirs = [sysroot + '/usr/src/gtest/src', sysroot + '/usr/src/googletest/googletest/src']
|
|
if not self._add_sub_dependency(threads_factory(environment, self.for_machine, {})):
|
|
self.is_found = False
|
|
return
|