[CMake] Alternative toolchains? (alchemy, android ndk)

Michael Wild themiwi at gmail.com
Thu May 5 09:50:09 EDT 2011


On 05/05/2011 03:44 PM, Doug wrote:
> I've seen a few things that use alternative gnu toolchains to build things.
> 
> I haven't been able to figure out how to do this with cmake. Has anyone
> managed?
> 
> Examples:
> http://labs.adobe.com/technologies/alchemy/
> http://developer.android.com/sdk/ndk/index.html
> 
> Basically it seems I somehow need to cutout the root /usr/include and pass a
> new one in, as well as a specific alternative version of gcc; but I can't
> figure out how to do that in the cmake directives...
> 
> ~
> Doug.

I'm by no means a cross-compiling expert, but from what I know, you have
to provide a toolchain-file specifying the root directory containing the
toolchain (compilers, headers, libraries etc.), the target system name,
etc. The CMake WIKI [1] should be able to help you further. For Android
there's a project trying to build a common set of scripts and utilities [2].

HTH

Michael

[1] http://www.cmake.org/Wiki/CMake_Cross_Compiling
[2] http://code.google.com/p/android-cmake/


More information about the CMake mailing list