Easy native and cross compiling for CMake projects.
- Pure CMake scripts and no other dependencies.
- Support major platforms and system architectres, e.g.
windows
,linux
,android
,ios
,tizen
, etc.
- CMake >= 3.4 (3.8 or above is recommended)
- Download
arcbuild
andarcbuild.cmake
to<root of your project>
. - Generate build directory and build.
cmake -P arcbuild.cmake [(-D<var>=<value>)...] -S . -B build
cmake --build build --config <config> [--target <target>]
More arcbuild.cmake
documents will be found in docs,
and see CMake Build Tool Mode
OS | PLATFORM | ARCH | More Arguments |
---|---|---|---|
Windows | vs201{2,3,5,7,9} | x86, x64, arm | |
Linux | linux | x86, x64 | |
Android | android | arm{,v7-a,v8-a,64}, x86, x64 | TOOLCHAIN, STL, API_VERSION |
iOS | ios | [armv7;][armv7s;][arm64] | IOS_BITCODE, API_VERSION |
Raspberry Pi | pi | arm{,v7-a,v8-a} | |
Emscripten | emscripten | ||
Custom ARM | linux | arm{,v7-a,v8-a}, x86, x64 | |
Qualcomm TEE | qtee | arm{v5,v6m,v7,v7m,64} |
cmake -DPLATFORM=android -DROOT="E:\NDK\android-ndk-r11b" -P arcbuild.cmake
cmake -DPLATFORM=android -P arcbuild.cmake # use $ANDROID_NDK_ROOT
cmake -P arcbuild.cmake -DPLATFORM=vs2013
cmake -P arcbuild.cmake -DPLATFORM=vs2015
cmake -P arcbuild.cmake -DPLATFORM=vs2017
cmake -P arcbuild.cmake -DPLATFORM=linux
cmake -P arcbuild.cmake -DPLATFORM=ios -DIOS_BITCODE=ON
cmake -P arcbuild.cmake -DPLATFORM=ios -DARCH="i386;x86_64"
Build for Emscripten
cmake -P arcbuild.cmake -DPLATFORM=emscripten -DROOT=D:\emscripten\1.38.11 -DMAKE_PROGRAM=D:\gnu-tools\bin\make.exe
cmake -P arcbuild.cmake -DPLATFORM=linux -DARCH=arm -DROOT=~/arm-toolchain
For more arguments, please check Arguments for Platforms.
- hello_world: "Hello world" project.
- More tests.