- Crosscompile using CMake
After debunking crosscompiling beeing hard in an earlier post, i want demonstrate how it can be used to build CMake projects for foreign architectures.
To get started we need the same basic setup as in the previous crosscompilation post. Let’s assume the target environment has been installed into ${HOME}/crosscompile/bookworm-arm64. The project we are going to compile is the CMake version of Lua from github: walterschell/Lua.
The magic sauce to make CMake compile to foreign architectures effortlessly are toolchain files.