cmake_minimum_required(VERSION 3.13)

project(IoT_Light_Project)

add_executable(my_app src/main.c)

#Tell IDF build to link against this target.
set(IDF_PROJECT_EXECUTABLE my_app)

#Add FreeRTOS as a subdirectory. AFR_BOARD tells which board to target.
set(AFR_BOARD espressif.esp32_devkitc CACHE INTERNAL "")
add_subdirectory(FreeRTOS)

target_include_directories(my_app PRIVATE FreeRTOS/demos/device_shadow_for_aws)

#Link against the mqtt library so that we can use it. Dependencies are transitively linked.
target_link_libraries(my_app PRIVATE AFR::demo_device_shadow AFR::common_io AFR::demo_numeric_comparison)

