2025-07-03 17:12:25 +02:00
|
|
|
# The following lines of boilerplate have to be in your project's
|
|
|
|
|
# CMakeLists in this exact order for cmake to work correctly
|
2024-09-13 17:32:46 +02:00
|
|
|
cmake_minimum_required(VERSION 3.16.0)
|
2025-07-03 17:12:25 +02:00
|
|
|
|
2024-09-13 17:32:46 +02:00
|
|
|
set(PROJECT_VER "1.0")
|
|
|
|
|
set(PROJECT_VER_NUMBER 1)
|
|
|
|
|
|
2025-07-03 17:12:25 +02:00
|
|
|
# This should be done before using the IDF_TARGET variable.
|
|
|
|
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
2024-09-13 17:32:46 +02:00
|
|
|
|
2025-07-03 17:12:25 +02:00
|
|
|
project(espidf_arduino_matter_light)
|
2024-09-13 17:32:46 +02:00
|
|
|
|
|
|
|
|
# WARNING: This is just an example for using key for decrypting the encrypted OTA image
|
|
|
|
|
# Please do not use it as is.
|
|
|
|
|
if(CONFIG_ENABLE_ENCRYPTED_OTA)
|
|
|
|
|
target_add_binary_data(light.elf "esp_image_encryption_key.pem" TEXT)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(CONFIG_IDF_TARGET_ESP32C2)
|
|
|
|
|
include(relinker)
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-07-03 17:12:25 +02:00
|
|
|
idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++2a;-Os;-DCHIP_HAVE_CONFIG_H" APPEND)
|
2024-09-13 17:32:46 +02:00
|
|
|
idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND)
|
|
|
|
|
# For RISCV chips, project_include.cmake sets -Wno-format, but does not clear various
|
|
|
|
|
# flags that depend on -Wformat
|
2025-07-03 17:12:25 +02:00
|
|
|
idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND)
|