# The following lines of boilerplate have to be in your project's CMakeLists # in this exact order for cmake to work correctlycmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5) add_compile_options(-fdiagnostics-color=always) # (Not part of the boilerplate) # This example uses an extra component for common functions such as Wi-Fi and Ethernet connection. set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common) include($ENV{IDF_PATH}/tools/cmake/project.cmake) message("EXTRA_COMPONENT_DIRS: " ${EXTRA_COMPONENT_DIRS}) string(REGEX REPLACE ".*/\(.*\)" "\\1" CURDIR ${CMAKE_CURRENT_SOURCE_DIR}) project(${CURDIR}) git_describe(PROJECT_VERSION ${COMPONENT_DIR}) message("Project commit: " ${PROJECT_VERSION})