TipsAndTricks/Cmake,Eclipse, and SDKS

From Yocto Project
Revision as of 18:06, 10 February 2017 by Bavery (talk | contribs) (Created page with "= Cmake,Eclipse, and SDKS: Oh My!= Suppose you would like to use cmake in an sdk &/or would like to use cmake from the Yocto Eclipse plugin. There's a couple of tricks/issue...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Cmake,Eclipse, and SDKS: Oh My!

Suppose you would like to use cmake in an sdk &/or would like to use cmake from the Yocto Eclipse plugin. There's a couple of tricks/issues to be aware of.

Getting cmake into your sdk

Normally, if you do

$ bitbake core-image-sato -c populate_sdk  

the generated sdk does not include the build system created cmake. Using the host cmake, cross compilation will often work, but you will not have all the cmake options set to the generated cmake.
If you would like to include the generated cmake in your sdk , you need to add the following to your local.conf fille:


TOOLCHAIN_HOST_TASK_append = "${SDK_EXTRA_TOOLS}" 
SDK_EXTRA_TOOLS = " nativesdk-cmake     " 

Using the Eclipse plugin with the cmake from the sdk

This can get confusing because it may be unclear which cmake eclipse is using, if you have one in the sdk and one installed on the host. To make sure you get the cmake from the sdk, launch eclipse from a terminal that has already sourced the environment script. For example, :


$ . /home/me/poky-qemuarm-2.2-cmake/environment-setup-armv5e-poky-linux-gnueab
$ /home/me/eclipse/eclipse

That way, eclipse will find the "correct" cmake and wont complain about either CMAKE_ROOT or "cmake not installed properly"


Note: the current sdk's published on downloads.yoctoproject.org as of release 2.3 do NOT include cmake