src+build: Create gradle task to copy ndn-cxx headers to right places
This commit removes dependency on symbolic link, which creates problems
when compiling code on Windows platform.
Change-Id: I11c86ff1d3e5c94b5b7fcefbba43284703dc385d
diff --git a/app/build.gradle b/app/build.gradle
index 5c1b90b..b37327a 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -69,8 +69,16 @@
}
}
+ task copyNdnCxxHeaders(type: Copy) {
+ from('src/main/jni/ndn-cxx/src') {
+ include '**/*.hpp'
+ }
+ into 'build/generated/source/include/ndn-cxx'
+ }
+
// call regular ndk-build(.cmd) script from app directory
task ndkBuild(type: Exec) {
+ dependsOn copyNdnCxxHeaders
def args = [getNdkBuildCmd(), '-C', file('src/main').absolutePath]
if (System.env.NDK_BUILD_PARALLEL != null) {
diff --git a/app/src/main/jni/ndn-cxx-android/ndn-cxx b/app/src/main/jni/ndn-cxx-android/ndn-cxx
deleted file mode 120000
index cd44943..0000000
--- a/app/src/main/jni/ndn-cxx-android/ndn-cxx
+++ /dev/null
@@ -1 +0,0 @@
-../ndn-cxx/src
\ No newline at end of file
diff --git a/app/src/main/jni/ndn-cxx.mk b/app/src/main/jni/ndn-cxx.mk
index 2126962..34f2302 100644
--- a/app/src/main/jni/ndn-cxx.mk
+++ b/app/src/main/jni/ndn-cxx.mk
@@ -111,8 +111,8 @@
util/time-unit-test-clock.cpp \
util/time.cpp
LOCAL_SRC_FILES := $(addprefix ndn-cxx/src/,$(NDN_CXX_SRC_FILES))
-LOCAL_CPPFLAGS := -I$(LOCAL_PATH)/ndn-cxx/src -I$(LOCAL_PATH)/ndn-cxx-android
-LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ndn-cxx-android
+LOCAL_CPPFLAGS := -I$(LOCAL_PATH)/ndn-cxx/src -I$(LOCAL_PATH)/ndn-cxx-android -I$(LOCAL_PATH)/../../../build/generated/source/ndn-cxx
+LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/ndn-cxx-android $(LOCAL_PATH)/../../../build/generated/source/include
include $(BUILD_SHARED_LIBRARY)
include $(LOCAL_PATH_SAVED)/cryptopp/extras/jni/Android.mk