Skip to content

Commit 843c3bd

Browse files
authored
chore: use target_compile_definitions instead of appending to CMAKE_CXX_FLAGS (#2713)
# Summary Use `target_compile_definitions` instead of appending to `CMAKE_CXX_FLAGS`
1 parent 6292c52 commit 843c3bd

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

android/src/main/jni/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ set(RNS_GENERATED_DIR ${RNS_ANDROID_DIR}/build/generated)
77
set(RNS_GENERATED_JNI_DIR ${RNS_GENERATED_DIR}/source/codegen/jni)
88
set(RNS_GENERATED_REACT_DIR ${RNS_GENERATED_JNI_DIR}/react/renderer/components/rnsvg)
99

10-
string(
11-
APPEND
12-
CMAKE_CXX_FLAGS
13-
" -DREACT_NATIVE_MINOR_VERSION=${ReactAndroid_VERSION_MINOR}")
14-
1510
file(GLOB rnsvg_SRCS CONFIGURE_DEPENDS *.cpp ${RNS_COMMON_DIR}/react/renderer/components/rnsvg/*.cpp)
1611
file(GLOB rnsvg_codegen_SRCS CONFIGURE_DEPENDS ${RNS_GENERATED_REACT_DIR}/*cpp)
1712

@@ -93,3 +88,9 @@ target_compile_options(
9388
-Wno-gnu-zero-variadic-macro-arguments
9489
-Wno-dollar-in-identifier-extension
9590
)
91+
92+
target_compile_definitions(
93+
react_codegen_rnsvg
94+
PRIVATE
95+
REACT_NATIVE_MINOR_VERSION=${ReactAndroid_VERSION_MINOR}
96+
)

0 commit comments

Comments
 (0)