# TODO: Below lines are caused by problems with idf tolchain file which we had to use. But enforced usage of tolchain block normal pass of argument by conan generato.
# We can do it better, without such haks in code. But it is not for today task
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} $ENV{WORKAROUND_FOR_ESP32_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{WORKAROUND_FOR_ESP32_CXX_FLAGS}")

{% if config.esp32.extra_component_dirs %}

set(EXTRA_COMPONENT_DIRS
{% for dirs in config.esp32.extra_component_dirs %}
    {{ dirs }}
{% endfor %}
)

{% endif %}
set(IDF_TARGET {{ config.project.target.id }})

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

{% include 'project.cmake.j2' %}
