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 201cdaa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 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 Expand Up @@ -86,6 +87,8 @@ target_link_libraries(FirebaseCore PRIVATE
if(ANDROID)
target_link_libraries(FirebaseCore PUBLIC
FirebaseAndroidJNI)
target_link_libraries(FirebaseCore PRIVATE
JNI::JNI)
endif()

add_library(FirebaseAuth SHARED
Expand Down

0 comments on commit 201cdaa

Please sign in to comment.