[yocto] [eclipse][PATCH] plugins/cmake: Add sysroot specific include paths
Timo Mueller
timo.mueller at oss.bmw-carit.de
Thu May 22 01:56:46 PDT 2014
From: Timo Mueller <timo.mueller at bmw-carit.de>
CDT sets default include paths when a defined toolchain does not provide
include paths of its own. The default include paths point to the host
system which does not make sense for cross compiled projects.
Instead of using the default include paths we provide our own path that
points to the usr/include folder in the defined sysroot. Once this
custom include path is defined CDT does not add any additional include
paths.
[BUGFIX #5544]
Signed-off-by: Timo Mueller <timo.mueller at bmw-carit.de>
---
plugins/org.yocto.cmake.managedbuilder/plugin.xml | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/plugins/org.yocto.cmake.managedbuilder/plugin.xml b/plugins/org.yocto.cmake.managedbuilder/plugin.xml
index 7aa6671..431de6e 100644
--- a/plugins/org.yocto.cmake.managedbuilder/plugin.xml
+++ b/plugins/org.yocto.cmake.managedbuilder/plugin.xml
@@ -178,9 +178,10 @@
name="%config.debug.name"
parent="cdt.managedbuild.config.gnu.base">
<toolChain
- id="org.yocto.cmake.managedbuilder.toolchain.gnu.exe.debug"
- superClass="org.yocto.cmake.managedbuilder.toolchain.gnu.exe"
- supportsManagedBuild="true">
+ id="org.yocto.cmake.managedbuilder.toolchain.gnu.exe.debug"
+ languageSettingsProviders="org.yocto.cmake.managedbuilder.includeProvider"
+ superClass="org.yocto.cmake.managedbuilder.toolchain.gnu.exe"
+ supportsManagedBuild="true">
<targetPlatform
id="org.yocto.cmake.managedbuilder.target.gnu.exe.debug"
isAbstract="false"
@@ -280,4 +281,16 @@
projectType="org.yocto.sdk.ide.buildArtefact.cmake.exe">
</template>
</extension>
+ <extension
+ point="org.eclipse.cdt.core.LanguageSettingsProvider">
+ <provider
+ id="org.yocto.cmake.managedbuilder.includeProvider"
+ name="IncludeProvider"
+ prefer-non-shared="false">
+ <entry
+ kind="includePath"
+ name="${Sysroot}/usr/include">
+ </entry>
+ </provider>
+ </extension>
</plugin>
--
1.9.0
More information about the yocto
mailing list