GithubHelp home page GithubHelp logo

maxint / arcbuild Goto Github PK

View Code? Open in Web Editor NEW
35.0 6.0 11.0 156 KB

Easy cmake native and cross compiling for Android, iOS, Windows, Linux, etc.

License: MIT License

CMake 99.57% Batchfile 0.26% Shell 0.18%
cmake cross-platform build-tools

arcbuild's Introduction

ArcBuild

build status build status build status build status

Easy native and cross compiling for CMake projects.

Features

  • Pure CMake scripts and no other dependencies.
  • Support major platforms and system architectres, e.g. windows, linux, android, ios, tizen, etc.

Dependencies

  • CMake >= 3.4 (3.8 or above is recommended)

Usage

  1. Download arcbuild and arcbuild.cmake to <root of your project>.
  2. 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

Supported Platforms and Arguments Preview

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}

Building Examples

Build for Android (ARCH=armv7-a by default)

cmake -DPLATFORM=android -DROOT="E:\NDK\android-ndk-r11b" -P arcbuild.cmake
cmake -DPLATFORM=android -P arcbuild.cmake # use $ANDROID_NDK_ROOT

Build for MSVC (ARCH=x86 by default)

cmake -P arcbuild.cmake -DPLATFORM=vs2013
cmake -P arcbuild.cmake -DPLATFORM=vs2015
cmake -P arcbuild.cmake -DPLATFORM=vs2017

Build for Linux (ARCH=x64 by default)

cmake -P arcbuild.cmake -DPLATFORM=linux

Build for iOS (ARCH="armv7;armv7s;arm64;arm64e" by default)

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

Custom cross compiling for Linux based platform

cmake -P arcbuild.cmake -DPLATFORM=linux -DARCH=arm -DROOT=~/arm-toolchain

For more arguments, please check Arguments for Platforms.

Example Projects

TODO

  • More tests.

arcbuild's People

Contributors

ifpelset avatar maxint avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.