zephyr/boards/common/esp32.board.cmake
Sebastian Bøe 35b2021d87 cmake: esp32: Fix check for environment variable ESP_IDF_PATH
Environment variables should be checked with if(DEFINED
ENV{ESP_IDF_PATH}).

if($ENV{ESP_IDF_PATH}) was not evaluating to true as it should have
when env[ESP_IDF_PATH] was set.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2017-12-27 10:29:35 -05:00

13 lines
383 B
CMake

set(BOARD_FLASH_RUNNER esp32)
if(NOT DEFINED ESP_IDF_PATH)
if(DEFINED ENV{ESP_IDF_PATH})
message(WARNING "Setting ESP_IDF_PATH in the environment is deprecated. Use cmake -DESP_IDF_PATH=... instead.")
set(ESP_IDF_PATH $ENV{ESP_IDF_PATH})
endif()
endif()
assert(ESP_IDF_PATH "ESP_IDF_PATH is not set")
board_finalize_runner_args(esp32 "--esp-idf-path=${ESP_IDF_PATH}")