Add Android examples.

This commit is contained in:
Hugh Wang
2016-09-14 17:16:18 +08:00
parent 72a6fd65da
commit 96267654e6
5 changed files with 34 additions and 3 deletions

15
example/jni/Android.mk Normal file
View File

@@ -0,0 +1,15 @@
# Setup a project
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := example
LOCAL_SRC_FILES := example.cpp
LOCAL_CPPFLAGS += -Wall -Wshadow -Wextra -pedantic -std=c++11 -fPIE -pie
LOCAL_LDFLAGS += -fPIE -pie
# Add exception support and set path for spdlog's headers
LOCAL_CPPFLAGS += -fexceptions -I../include
# Use android's log library
LOCAL_LDFLAGS += -llog
include $(BUILD_EXECUTABLE)

View File

@@ -0,0 +1,2 @@
# Exceptions are used in spdlog. Link to an exception-ready C++ runtime.
APP_STL = gnustl_static

1
example/jni/example.cpp Symbolic link
View File

@@ -0,0 +1 @@
../example.cpp