fix: Avoid duplicate C++ symbols by using libjsi.so shared library (#494)

* fix: Avoid duplicate C++ symbols by using `libjsi.so` shared library

* exclude `libfbjni` and `libjsi` from packaging options
This commit is contained in:
Marc Rousavy 2021-10-07 11:16:19 +02:00 committed by GitHub
parent bad9f99ac7
commit fc43b1bb7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 10 deletions

View File

@ -81,11 +81,6 @@ else()
file (GLOB LIBREANIMATED_DIR "${BUILD_DIR}/react-native-reanimated-*-jsc.aar/jni/${ANDROID_ABI}")
endif()
find_library(
LOG_LIB
log
)
find_library(
FBJNI_LIB
fbjni
@ -93,12 +88,11 @@ find_library(
NO_CMAKE_FIND_ROOT_PATH
)
find_library(
REANIMATED_LIB
reanimated
PATHS ${LIBREANIMATED_DIR}
JSI_LIB
jsi
PATHS ${LIBRN_DIR}
NO_CMAKE_FIND_ROOT_PATH
)
find_library(
FOLLY_JSON_LIB
folly_json
@ -113,12 +107,25 @@ find_library(
NO_CMAKE_FIND_ROOT_PATH
)
find_library(
REANIMATED_LIB
reanimated
PATHS ${LIBREANIMATED_DIR}
NO_CMAKE_FIND_ROOT_PATH
)
find_library(
LOG_LIB
log
)
# linking
message(WARNING "VisionCamera linking: FOR_HERMES=${FOR_HERMES}")
target_link_libraries(
${PACKAGE_NAME}
${LOG_LIB}
${JSI_LIB}
${JS_ENGINE_LIB} # <-- Hermes or JSC
${REANIMATED_LIB}
${REACT_NATIVE_JNI_LIB}

View File

@ -112,7 +112,7 @@ android {
}
packagingOptions {
excludes = ["**/libc++_shared.so", "**/libfbjni.so"]
excludes = ["**/libc++_shared.so", "**/libfbjni.so", "**/libjsi.so"]
}
buildTypes {