# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

# Link Arduino as global component
set(EXTRA_COMPONENT_DIRS "../esp32_global_components")

# add compile definitions
add_compile_definitions(
    ARDUINO_USB_CDC_ON_BOOT=1
    ARDUINO_USB_MODE=1
)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
idf_build_set_property(MINIMAL_BUILD ON)
project(bat-remote)

# Don't treat warning as errors
idf_build_set_property(COMPILE_OPTIONS "-Wno-error" APPEND) 
