Skip to content

Commit 092a0f2

Browse files
committed
Replaced internal JNI code with JNI library
1 parent 195161a commit 092a0f2

33 files changed

+62
-2526
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ find_package(pugixml REQUIRED)
1919
find_package(Bento4 REQUIRED)
2020
find_package(NlohmannJSON REQUIRED)
2121

22+
# JNI android wrapper library
23+
if(CORE_SYSTEM_NAME STREQUAL android)
24+
find_package(LibAndroidJNI REQUIRED)
25+
endif()
26+
2227
if(CMAKE_CXX_COMPILER MATCHES "arm-webos")
2328
add_compile_definitions(TARGET_WEBOS=1)
2429
endif()
@@ -57,6 +62,7 @@ list(APPEND ADP_HEADERS ${HEADERS_LIST})
5762
include_directories(${INCLUDES}
5863
${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways (becomes done in future)
5964
${NLOHMANNJSON_INCLUDE_DIRS}
65+
$<$<STREQUAL:${CORE_SYSTEM_NAME},android>:${LIBANDROIDJNI_INCLUDE_DIRS}>
6066
src/
6167
)
6268

@@ -75,6 +81,10 @@ list(APPEND DEPLIBS ${PUGIXML_LIBRARIES}
7581
webm_parser
7682
)
7783

84+
if(CORE_SYSTEM_NAME STREQUAL android)
85+
list(APPEND DEPLIBS ${LIBANDROIDJNI_LIBRARIES})
86+
endif()
87+
7888
# Add additional dependencies
7989
get_property(DEPS_FOLDERS_LIST GLOBAL PROPERTY GlobalDepsFoldersList)
8090
foreach(DEP_FOLDER ${DEPS_FOLDERS_LIST})

FindLibAndroidJNI.cmake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# - Find LibAndroidJNI
2+
# Once done this will define
3+
#
4+
# LIBANDROIDJNI_FOUND - True if LibAndroidJNI found.
5+
# LIBANDROIDJNI_INCLUDE_DIRS - where to find androidjni
6+
#
7+
8+
find_path(LIBANDROIDJNI_INCLUDE_DIRS include/androidjni)
9+
find_library(LIBANDROIDJNI_LIBRARIES androidjni)
10+
11+
include(FindPackageHandleStandardArgs)
12+
find_package_handle_standard_args(LibAndroidJNI REQUIRED_VARS LIBANDROIDJNI_INCLUDE_DIRS LIBANDROIDJNI_LIBRARIES)
13+
14+
mark_as_advanced(LIBANDROIDJNI_INCLUDE_DIRS LIBANDROIDJNI_LIBRARIES)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18b43677838865ecf9bd331bbbe81541d36784d720b72445f9e2230addd83a80
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
libandroidjni https://github.com/CastagnaIT/libandroidjni/archive/993a880aa562d7c331c09ea827c029f75d2480b3.tar.gz

lib/jni/CMakeLists.txt

Lines changed: 0 additions & 30 deletions
This file was deleted.

lib/jni/jni/jutils/jni.inc

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)