# the minimum version of CMake
cmake_minimum_required(VERSION 3.5.0)
set(CMAKE_VERBOSE_MAKEFILE on)

# 设置 Codegen 生成目录，指定 generated 目录路径
set(push_notification_generated_dir "${CMAKE_CURRENT_SOURCE_DIR}/generated")

# 明确列出所有需要的生成文件
set(push_notification_generated_src
    "${push_notification_generated_dir}/RNOH/generated/turbo_modules/RTNPushNotification.cpp"
    "${push_notification_generated_dir}/react/renderer/components/push_notification/EventEmitters.cpp"
    "${push_notification_generated_dir}/react/renderer/components/push_notification/Props.cpp"
    "${push_notification_generated_dir}/react/renderer/components/push_notification/ShadowNodes.cpp"
    "${push_notification_generated_dir}/react/renderer/components/push_notification/States.cpp"
)
set(rnoh_include_dirs
    "${CMAKE_CURRENT_SOURCE_DIR}"
    "${push_notification_generated_dir}"
    "${push_notification_generated_dir}/RNOH/generated"
    "${CMAKE_CURRENT_SOURCE_DIR}/../../../../@rnoh/react-native-openharmony/src/main/cpp"
)
file(GLOB rnoh_push_notification_SRC CONFIGURE_DEPENDS *.cpp colorUtils/*.cpp)
add_library(rnoh_push_notification SHARED ${rnoh_push_notification_SRC} ${push_notification_generated_src})
target_include_directories(rnoh_push_notification PUBLIC 
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${push_notification_generated_dir}
    ${push_notification_generated_dir}/RNOH/generated
)
target_link_libraries(rnoh_push_notification PUBLIC rnoh)