From 380d2cf638e699113b417ec70d545e9423dfe0da Mon Sep 17 00:00:00 2001 From: Noel Eck Date: Tue, 11 Apr 2017 14:50:03 -0700 Subject: [PATCH] CMakeLists.txt: Find AT-specific jni.h Updated the java CMakeLists file to set the JAVA_INCLUDE_PATH for Android Things. The JAVA SWIG wrapper will require the jni.h from the Android NDK. Signed-off-by: Noel Eck --- src/java/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/java/CMakeLists.txt b/src/java/CMakeLists.txt index fbcbe6e..0a86302 100644 --- a/src/java/CMakeLists.txt +++ b/src/java/CMakeLists.txt @@ -1,4 +1,11 @@ FIND_PACKAGE (JNI REQUIRED) + +if (PERIPHERALMAN) + # Override the JNI include directory for Android Things since these + # will require an Android-friendly jni.h + set(JAVA_INCLUDE_PATH "${ANDROID_SYSROOT}/usr/include") +endif() + include_directories ( ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}