if("${ESP8266_ESPTOOL_COM_PORT}" STREQUAL "" AND NOT "$ENV{ESP8266_ESPTOOL_COM_PORT}" STREQUAL "")
    set(ESP8266_ESPTOOL_COM_PORT "$ENV{ESP8266_ESPTOOL_COM_PORT}" CACHE STRING "COM-Port for flashing")
endif()

if(NOT "${ESP8266_ESPTOOL_COM_PORT}" STREQUAL "")
    message(STATUS "Using ESP8266_ESPTOOL_COM_PORT ${ESP8266_ESPTOOL_COM_PORT}")
endif()
