From ded07cb11c3560374ef707cdf807d4d62e8238a8 Mon Sep 17 00:00:00 2001 From: Ian Berry Date: Wed, 15 Oct 2025 09:53:14 -0400 Subject: [PATCH] update cmake build to use new target_compile_reactnative_options as required by react native 0.81 --- android/src/main/jni/CMakeLists.txt | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/android/src/main/jni/CMakeLists.txt b/android/src/main/jni/CMakeLists.txt index c0205f5..adebd3a 100644 --- a/android/src/main/jni/CMakeLists.txt +++ b/android/src/main/jni/CMakeLists.txt @@ -21,12 +21,16 @@ target_link_libraries( reactnative ) -target_compile_options( - react_codegen_RTNDatePickerSpecs - PRIVATE - -DLOG_TAG=\"ReactNative\" - -fexceptions - -frtti - -std=c++20 - -Wall -) +if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 80) + target_compile_reactnative_options(react_codegen_RTNDatePickerSpecs PRIVATE) +else() + target_compile_options( + react_codegen_RTNDatePickerSpecs + PRIVATE + -DLOG_TAG=\"ReactNative\" + -fexceptions + -frtti + -std=c++20 + -Wall + ) +endif()