# 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.5) if(NOT DEFINED ENV{ESP_MATTER_PATH}) message(FATAL_ERROR "Please set ESP_MATTER_PATH to the path of esp-matter repo") endif(NOT DEFINED ENV{ESP_MATTER_PATH}) set(ESP_MATTER_PATH $ENV{ESP_MATTER_PATH}) set(MATTER_SDK_PATH ${ESP_MATTER_PATH}/connectedhomeip/connectedhomeip) if(NOT DEFINED ENV{ESP_RMAKER_PATH}) message(FATAL_ERROR "Please set ESP_RMAKER_PATH to the path of esp-rainmaker repo") endif(NOT DEFINED ENV{ESP_RMAKER_PATH}) # This should be done before using the IDF_TARGET variable. include($ENV{IDF_PATH}/tools/cmake/project.cmake) set(EXTRA_COMPONENT_DIRS "../common" "${MATTER_SDK_PATH}/config/esp32/components" "${ESP_MATTER_PATH}/components" "$ENV{ESP_RMAKER_PATH}/components" ) if(${IDF_TARGET} STREQUAL "esp32") list(APPEND EXTRA_COMPONENT_DIRS "${MATTER_SDK_PATH}/examples/common/m5stack-tft/repo/components/tft" "${MATTER_SDK_PATH}/examples/common/m5stack-tft/repo/components/spidriver" ) elseif(${IDF_TARGET} STREQUAL "esp32c3") list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/examples/peripherals/rmt/led_strip/components" ) endif() project(rainmaker_light) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND)