# For more information about build system see
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html
# The following five 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.22)

# IDF v6.0 removed SECP192K1 from PSA crypto, but TRTC requires it for ECDH.
# TF_PSA_CRYPTO_ALLOW_REMOVED_MECHANISMS bypasses the "no longer supported" check.
# PSA_WANT_ECC_SECP_K1_192 enables the curve in PSA driver tables.
add_compile_definitions(
  TF_PSA_CRYPTO_ALLOW_REMOVED_MECHANISMS
  PSA_WANT_ECC_SECP_K1_192=1
)

# 使用默认配置
set(SDKCONFIG_DEFAULTS
    "${CMAKE_CURRENT_LIST_DIR}/sdkconfig.defaults"
)

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(tc-iot-video-rtc)

# SPIFFS 镜像：将 spiffs_data/ 目录打包烧录到 "storage" 分区
spiffs_create_partition_image(storage spiffs_data FLASH_IN_PROJECT)
