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:
parent
bad9f99ac7
commit
fc43b1bb7c
@ -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}
|
||||
|
@ -112,7 +112,7 @@ android {
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
excludes = ["**/libc++_shared.so", "**/libfbjni.so"]
|
||||
excludes = ["**/libc++_shared.so", "**/libfbjni.so", "**/libjsi.so"]
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
Loading…
Reference in New Issue
Block a user