Skip to content

Commit d2d951b

Browse files
committed
build: use FindJNI to locate required headers
We use `jni.h` for the android support library. Setup the search in CMake to allow us to find the header and include the header search path properly.
1 parent 2227bd7 commit d2d951b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ project(swift-firebase
66
if(ANDROID)
77
enable_language(C)
88
include(FindJava)
9+
include(FindJNI)
910
include(UseJava)
1011
endif()
1112

Sources/FirebaseAndroid/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ add_library(FirebaseAndroidJNI SHARED
55
target_include_directories(FirebaseAndroidJNI PUBLIC
66
include)
77
target_link_libraries(FirebaseAndroidJNI PRIVATE
8-
log)
8+
log
9+
JNI::JNI)
910

1011
add_jar(SwiftFirebase
1112
Native.java

0 commit comments

Comments
 (0)