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)
99set (LIB_ANDROID_GENERATED_JNI_DIR ${LIB_ANDROID_DIR} /build /generated /source /codegen/jni)
1010set (LIB_ANDROID_GENERATED_COMPONENTS_DIR ${LIB_ANDROID_GENERATED_JNI_DIR} /react/renderer/components/${LIB_LITERAL} )
1111
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-
2112file (GLOB LIB_CUSTOM_SRCS CONFIGURE_DEPENDS *.cpp ${LIB_COMMON_DIR} /react/renderer/components/${LIB_LITERAL} /*.cpp)
2213file (GLOB LIB_CODEGEN_SRCS CONFIGURE_DEPENDS ${LIB_ANDROID_GENERATED_JNI_DIR} /*.cpp ${LIB_ANDROID_GENERATED_COMPONENTS_DIR} /*.cpp)
2314
@@ -70,6 +61,21 @@ else()
7061 )
7162endif ()
7263
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+
7379target_compile_options (
7480 ${LIB_TARGET_NAME}
7581 PRIVATE
You can’t perform that action at this time.
0 commit comments