Skip to content

Commit

Permalink
build: use FindJNI to locate required headers
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
compnerd committed Aug 2, 2024
1 parent b8670f5 commit 903dcc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ project(swift-firebase
if(ANDROID)
enable_language(C)
include(FindJava)
include(FindJNI)
include(UseJava)
endif()

Expand Down
3 changes: 2 additions & 1 deletion Sources/FirebaseAndroid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ add_library(FirebaseAndroidJNI SHARED
target_include_directories(FirebaseAndroidJNI PUBLIC
include)
target_link_libraries(FirebaseAndroidJNI PRIVATE
log)
log
JNI::JNI)

add_jar(SwiftFirebase
Native.java
Expand Down

0 comments on commit 903dcc6

Please sign in to comment.