File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
package/android/src/main/jni Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,6 @@ set(LIB_COMMON_DIR ${LIB_ANDROID_DIR}/../common/cpp)
9
9
set (LIB_ANDROID_GENERATED_JNI_DIR ${LIB_ANDROID_DIR} /build/generated/source/codegen/jni )
10
10
set (LIB_ANDROID_GENERATED_COMPONENTS_DIR ${LIB_ANDROID_GENERATED_JNI_DIR} /react/renderer/components/${LIB_LITERAL} )
11
11
12
- add_compile_options (
13
- -fexceptions
14
- -frtti
15
- -std=c++20
16
- -Wall
17
- -Wpedantic
18
- -Wno-gnu-zero-variadic-macro-arguments
19
- )
20
-
21
12
file (GLOB LIB_CUSTOM_SRCS CONFIGURE_DEPENDS *.cpp ${LIB_COMMON_DIR} /react/renderer/components/${LIB_LITERAL}/*.cpp )
22
13
file (GLOB LIB_CODEGEN_SRCS CONFIGURE_DEPENDS ${LIB_ANDROID_GENERATED_JNI_DIR} /*.cpp ${LIB_ANDROID_GENERATED_COMPONENTS_DIR} /*.cpp )
23
14
@@ -70,6 +61,21 @@ else()
70
61
)
71
62
endif ()
72
63
64
+ if (ReactAndroid_VERSION_MINOR GREATER_EQUAL 81 )
65
+ target_compile_reactnative_options (${LIB_TARGET_NAME} PUBLIC )
66
+ else ()
67
+ target_compile_options (
68
+ ${LIB_TARGET_NAME}
69
+ PRIVATE
70
+ -fexceptions
71
+ -frtti
72
+ -std=c++20
73
+ -Wall
74
+ -Wpedantic
75
+ -Wno-gnu-zero-variadic-macro-arguments
76
+ )
77
+ endif ()
78
+
73
79
target_compile_options (
74
80
${LIB_TARGET_NAME}
75
81
PRIVATE
You can’t perform that action at this time.
0 commit comments