Skip to content

Commit

Permalink
fix: Fix build for RN 0.76 by using new shared prefab (#3263)
Browse files Browse the repository at this point in the history
* fix: Fix build for RN 0.76 by using new shared prefab

* fix: Make backwards compatible
  • Loading branch information
mrousavy authored Oct 30, 2024
1 parent 322b38a commit 48b4300
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion package/android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,22 @@ target_link_libraries(
${LOG_LIB} # <-- Logcat logger
android # <-- Android JNI core
ReactAndroid::jsi # <-- RN: JSI
ReactAndroid::reactnativejni # <-- RN: React Native JNI bindings
fbjni::fbjni # <-- fbjni
)

# Link react-native (different prefab between RN 0.75 and RN 0.76)
if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
target_link_libraries(
${PACKAGE_NAME}
ReactAndroid::reactnative # <-- RN: Native Modules umbrella prefab
)
else()
target_link_libraries(
${PACKAGE_NAME}
ReactAndroid::reactnativejni # <-- RN: JNI Utils (e.g. CallInvoker)
)
endif()

# Optionally also add Frame Processors here
message("VisionCamera: Frame Processors: ${ENABLE_FRAME_PROCESSORS}!")
if (ENABLE_FRAME_PROCESSORS)
Expand Down

0 comments on commit 48b4300

Please sign in to comment.