Android: move JNI C++ utils into a common folder.

No need for a proper library, this is just a common location to simplify
JNI bindings in other projects like filamat and gltfio.

There is no need to move the one Java source file (`NioUtils.java`)
since downstream libraries will have a dependency on Filament, and
FindClass should work fine.
This commit is contained in:
Philip Rideout
2019-06-14 13:29:31 -07:00
parent 77d058cf76
commit 94b4f92bc5
14 changed files with 27 additions and 26 deletions

View File

@@ -28,14 +28,16 @@ endif()
# ==================================================================================================
set(TARGET filament-jni)
include_directories(${JNI_INCLUDE_DIRS})
set(CXX_STANDARD "-std=c++14")
if (WIN32)
set(CXX_STANDARD "/std:c++14")
endif()
set(FILAMENT_DIR ../../android/filament-android)
set(ANDROID_DIR ../../android)
set(FILAMENT_DIR ${ANDROID_DIR}/filament-android)
set(COMMON_DIR ${ANDROID_DIR}/common)
include_directories(${JNI_INCLUDE_DIRS} ${ANDROID_DIR})
set(JNI_SOURCE_FILES
${FILAMENT_DIR}/src/main/cpp/Camera.cpp
@@ -61,11 +63,12 @@ set(JNI_SOURCE_FILES
${FILAMENT_DIR}/src/main/cpp/TransformManager.cpp
${FILAMENT_DIR}/src/main/cpp/View.cpp
# Private utils
${FILAMENT_DIR}/src/main/cpp/CallbackUtils.cpp
${FILAMENT_DIR}/src/main/cpp/Filament.cpp
${FILAMENT_DIR}/src/main/cpp/NioUtils.cpp
# Desktop specific
${FILAMENT_DIR}/src/main/cpp/nativewindow/JAWTUtils.cpp
# Common utils
${COMMON_DIR}/CallbackUtils.cpp
${COMMON_DIR}/NioUtils.cpp
)
if (LINUX)