-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] enable new arch #3244
[WIP] enable new arch #3244
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
1a0e833
to
f2635c0
Compare
Hi @hannojg, I saw you already had this PR in progress and thought it might be easier to offer up a change needed for 0.76.0/new arch support since it modifies the CMakeLists.txt file which you are modifying here (in the spirit of reducing conflicts). Here is the patch I am running for 0.76.0. The conditional is one being applied by other libraries (https://github.com/Shopify/react-native-skia/pull/2694/files). The flag provided by RN is still not working even in 0.76.0-rc.5 but you can see the discussion regarding it here (react-native-community/discussions-and-proposals#816) index 1460dbd7729f1375852876f13af0e89c46c1382e..75b5d742ad754fc1b4ced77840ade71098ba1e84 100644
--- a/android/CMakeLists.txt
+++ b/android/CMakeLists.txt
@@ -54,15 +54,29 @@ target_include_directories(
"${NODE_MODULES_DIR}/react-native/ReactAndroid/src/main/jni/react/turbomodule" # <-- CallInvokerHolder JNI wrapper
)
-# Link everything together
-target_link_libraries(
- ${PACKAGE_NAME}
- ${LOG_LIB} # <-- Logcat logger
- android # <-- Android JNI core
- ReactAndroid::jsi # <-- RN: JSI
- ReactAndroid::reactnativejni # <-- RN: React Native JNI bindings
- fbjni::fbjni # <-- fbjni
-)
+
+
+# This if-then-else can be removed once this library does not support version below 0.76
+if (ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
+ target_link_libraries(
+ ${PACKAGE_NAME}
+ ${LOG_LIB}
+ android
+ ReactAndroid::reactnative
+ ReactAndroid::jsi
+ fbjni::fbjni
+ )
+else()
+ # Link everything together
+ target_link_libraries(
+ ${PACKAGE_NAME}
+ ${LOG_LIB} # <-- Logcat logger
+ android # <-- Android JNI core
+ ReactAndroid::jsi # <-- RN: JSI
+ ReactAndroid::reactnativejni # <-- RN: React Native JNI bindings
+ fbjni::fbjni # <-- fbjni
+ )
+endif()
# Optionally also add Frame Processors here
message("VisionCamera: Frame Processors: ${ENABLE_FRAME_PROCESSORS}!")``` |
If you'd prefer a separate PR I can certainly go that route. Just let me know. |
Thanks for bringing this to my attention I will consider this! |
actually i'll close this PR for this one, but i'll keep your comments in mind. |
What
Changes
Tested on
Related issues