feat(mqtt): Stop cmake process if submodule is missing

Closes https://github.com/espressif/esp-idf/issues/12202
This commit is contained in:
Euripedes Rocha 2023-09-13 09:13:31 +02:00
parent e5739ddd45
commit 8af82c87b2

View File

@ -1 +1,6 @@
include(${CMAKE_CURRENT_LIST_DIR}/esp-mqtt/CMakeLists.txt)
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/esp-mqtt/CMakeLists.txt)
set(COMMAND "git submodule update --init --recursive")
message(FATAL_ERROR "Missing esp-mqtt submodule. Please run '${COMMAND}' in ESP-IDF directory to fix this.")
else()
include(${CMAKE_CURRENT_LIST_DIR}/esp-mqtt/CMakeLists.txt)
endif()