Skip to content

crystax/android-samples-cmake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Simple CMake-enabled example working with CrystaX NDK

This is an example showing how to use CMake for building Android binaries with CrystaX NDK version 10.4.0 or higher. Right now (Feb 8, 2016) 10.4.0 is not yet released, so in the meantime please use CrystaX NDK daily build #802 or higher.

This sample written in a way to be portable, so it works the same on OS X, GNU/Linux and Android. Here is example:

Build on OS X and GNU/Linux:

  $ mkdir build
  $ cd build
  $ cmake ..
  ....
  $ make
  ....
  $ make run
  [100%] Built target cmake-test
  Scanning dependencies of target run
  Hello, world!
  [100%] Built target run

Build for Android:

  $ export NDK=/path/to/the/unpacked/crystax-ndk
  $ mkdir build
  $ cd build
  $ cmake -DCMAKE_TOOLCHAIN_FILE=$NDK/cmake/toolchain.cmake -DANDROID_ABI=armeabi-v7a-hard ..
  ....
  $ make
  ....
  $ make run
  [100%] Built target cmake-test
  Scanning dependencies of target run
  Hello, world!
  [100%] Built target run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published