This a blueprint c++ project build via cmake. Also included is the continuous integration system travis-ci.
Host System | Destination System | Status |
---|---|---|
Ubunut 14.04 | Ubunut 14.04 | |
Android | coming soon... |
Here you can download the latest Release.
####Project Structure
├── cmake
│ ├── helper.cmake
| └── ..
|
├── dependencies
| ├── SDL2
| └── ..
|
├── platform
| ├── android
| └── ..
|
├── source
| ├── component1
| │ ├── include
| │ │ └── *.h
| │ ├── source
| │ | └── *.cpp
| │ └── CMakeLists.txt
| │
| ├── component2
| | └── ..
| └── CMakeLists.txt
|
├── CMakeLists.txt
└── build.py
cmake
all cmake helper functions, toolchain filesplatform
platform dependent code (expl.: android java wrapper, manifest.xml)source
source components (libraries, binaries)dependentcies
source, headers of thirdparty dependenciesbuild.py
used for automatic cmake cross build
To build for your current host platform just go into source folder and execute:
mkdir build
cd build
cmake ..
make
If you want to generate a installer from libs, binary use make package
For cross compiling use a toolchain. As example we will do that for android (install android ndk and skd before). (more info of android.toolchain)
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/android.toolchain.cmake \
-DANDROID_NDK=<ndk_path> \
-DANDROID_ABI="armeabi-v7a with NEON" \
..
make
make BuildApk
The make BuildApk
command creates a ready android application file.
Alternatively you can use build.py to cross compile.
./build.py --android <android_api>