Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ospfranco committed Oct 26, 2024
1 parent ec509df commit 81fa9b1
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 30 deletions.
91 changes: 62 additions & 29 deletions android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,39 +73,72 @@ find_package(fbjni REQUIRED CONFIG)
find_library(LOG_LIB log)

if (USE_SQLCIPHER)
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::turbomodulejsijni
ReactAndroid::react_nativemodule_core
android
openssl::crypto
)
if (ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
ReactAndroid::reactnative
ReactAndroid::jsi
fbjni::fbjni
openssl::crypto
)
else()
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::turbomodulejsijni
ReactAndroid::react_nativemodule_core
android
openssl::crypto
)
endif()
elseif (USE_LIBSQL)
cmake_path(SET LIBSQL ${CMAKE_CURRENT_SOURCE_DIR}/jniLibs/${ANDROID_ABI}/libsql_experimental.a NORMALIZE)
add_library(libsql STATIC IMPORTED)
set_target_properties(libsql PROPERTIES IMPORTED_LOCATION ${LIBSQL})

target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::turbomodulejsijni
ReactAndroid::react_nativemodule_core
android
libsql
)
if (ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
ReactAndroid::reactnative
ReactAndroid::jsi
fbjni::fbjni
libsql
)
else()
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::turbomodulejsijni
ReactAndroid::react_nativemodule_core
android
libsql
)
endif()
else ()
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::turbomodulejsijni
ReactAndroid::react_nativemodule_core
android
)
# if (REACTNATIVE_MERGED_SO)
if (ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
ReactAndroid::reactnative
ReactAndroid::jsi
fbjni::fbjni
)
else()
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
fbjni::fbjni
ReactAndroid::jsi
ReactAndroid::turbomodulejsijni
ReactAndroid::react_nativemodule_core
android
)
endif()
endif()
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ android {

defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 24)
targetSdkVersion safeExtGet('targetSdkVersion', 34)
targetSdkVersion safeExtGet('targetSdkVersion', 35)
versionCode 1
versionName "1.0"

Expand Down

0 comments on commit 81fa9b1

Please sign in to comment.