From: Timo Mueller <[email protected]>

The sysroots provided by the toolchain were not added to the
CMAKE_FIND_ROOT_PATH variable. This resolved into CMake searching on the
host system breaking cross-compilation in some cases.

With the addition of the sysroot environment variables provided by
oecore, we make sure that these sysroots are scanned when CMake is
conducting searches.

[BUGFIX #6314]

Signed-off-by: Timo Mueller <[email protected]>
---
 .../org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java
 
b/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java
index 4119aaf..cac6b84 100644
--- 
a/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java
+++ 
b/plugins/org.yocto.cmake.managedbuilder/src/org/yocto/cmake/managedbuilder/YoctoCMakeMakefileGenerator.java
@@ -228,7 +228,9 @@ public class YoctoCMakeMakefileGenerator implements 
IManagedBuilderMakefileGener
                toolchainCMakeFileContentAsString += "# only search in the 
paths provided so cmake doesnt pick\n"; //$NON-NLS-1$
                toolchainCMakeFileContentAsString += "# up libraries and tools 
from the native build machine\n"; //$NON-NLS-1$
 
-               List<String> findRootPathValues = 
Arrays.asList("STAGING_DIR_HOST", //$NON-NLS-1$
+               List<String> findRootPathValues = 
Arrays.asList("OECORE_NATIVE_SYSROOT", //$NON-NLS-1$
+                                                                               
                                "OECORE_TARGET_SYSROOT", //$NON-NLS-1$
+                                                                               
                                "STAGING_DIR_HOST", //$NON-NLS-1$
                                                                                
                                "STAGING_DIR_NATIVE", //$NON-NLS-1$
                                                                                
                                "CROSS_DIR", //$NON-NLS-1$
                                                                                
                                "OECMAKE_PERLNATIVE_DIR", //$NON-NLS-1$
-- 
1.9.0

-- 
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to