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}")
|
file (GLOB LIBREANIMATED_DIR "${BUILD_DIR}/react-native-reanimated-*-jsc.aar/jni/${ANDROID_ABI}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
find_library(
|
|
||||||
LOG_LIB
|
|
||||||
log
|
|
||||||
)
|
|
||||||
find_library(
|
find_library(
|
||||||
FBJNI_LIB
|
FBJNI_LIB
|
||||||
fbjni
|
fbjni
|
||||||
@ -93,12 +88,11 @@ find_library(
|
|||||||
NO_CMAKE_FIND_ROOT_PATH
|
NO_CMAKE_FIND_ROOT_PATH
|
||||||
)
|
)
|
||||||
find_library(
|
find_library(
|
||||||
REANIMATED_LIB
|
JSI_LIB
|
||||||
reanimated
|
jsi
|
||||||
PATHS ${LIBREANIMATED_DIR}
|
PATHS ${LIBRN_DIR}
|
||||||
NO_CMAKE_FIND_ROOT_PATH
|
NO_CMAKE_FIND_ROOT_PATH
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(
|
find_library(
|
||||||
FOLLY_JSON_LIB
|
FOLLY_JSON_LIB
|
||||||
folly_json
|
folly_json
|
||||||
@ -113,12 +107,25 @@ find_library(
|
|||||||
NO_CMAKE_FIND_ROOT_PATH
|
NO_CMAKE_FIND_ROOT_PATH
|
||||||
)
|
)
|
||||||
|
|
||||||
|
find_library(
|
||||||
|
REANIMATED_LIB
|
||||||
|
reanimated
|
||||||
|
PATHS ${LIBREANIMATED_DIR}
|
||||||
|
NO_CMAKE_FIND_ROOT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(
|
||||||
|
LOG_LIB
|
||||||
|
log
|
||||||
|
)
|
||||||
|
|
||||||
# linking
|
# linking
|
||||||
|
|
||||||
message(WARNING "VisionCamera linking: FOR_HERMES=${FOR_HERMES}")
|
message(WARNING "VisionCamera linking: FOR_HERMES=${FOR_HERMES}")
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${PACKAGE_NAME}
|
${PACKAGE_NAME}
|
||||||
${LOG_LIB}
|
${LOG_LIB}
|
||||||
|
${JSI_LIB}
|
||||||
${JS_ENGINE_LIB} # <-- Hermes or JSC
|
${JS_ENGINE_LIB} # <-- Hermes or JSC
|
||||||
${REANIMATED_LIB}
|
${REANIMATED_LIB}
|
||||||
${REACT_NATIVE_JNI_LIB}
|
${REACT_NATIVE_JNI_LIB}
|
||||||
|
@ -112,7 +112,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
excludes = ["**/libc++_shared.so", "**/libfbjni.so"]
|
excludes = ["**/libc++_shared.so", "**/libfbjni.so", "**/libjsi.so"]
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
Loading…
Reference in New Issue
Block a user