Skip to content

Commit 5b27f9d

Browse files
authored
fix: android crash on React Native 0.81 & new arch (#648)
1 parent cef1e2e commit 5b27f9d

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

android/src/main/jni/CMakeLists.txt

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,19 @@ else()
6464
)
6565
endif()
6666

67-
target_compile_options(
68-
${LIB_TARGET_NAME}
69-
PRIVATE
70-
-DLOG_TAG=\"ReactNative\"
71-
-fexceptions
72-
-frtti
73-
-std=c++20
74-
-Wall
75-
)
67+
if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 80)
68+
target_compile_reactnative_options(${LIB_TARGET_NAME} PRIVATE)
69+
else()
70+
target_compile_options(
71+
${LIB_TARGET_NAME}
72+
PRIVATE
73+
-DLOG_TAG=\"ReactNative\"
74+
-fexceptions
75+
-frtti
76+
-std=c++20
77+
-Wall
78+
)
79+
endif()
7680

7781
target_include_directories(
7882
${CMAKE_PROJECT_NAME}

0 commit comments

Comments
 (0)