From 8af82c87b20c95e2be4545d7e5ab0b17acdef0ed Mon Sep 17 00:00:00 2001 From: Euripedes Rocha Date: Wed, 13 Sep 2023 09:13:31 +0200 Subject: [PATCH] feat(mqtt): Stop cmake process if submodule is missing Closes https://github.com/espressif/esp-idf/issues/12202 --- components/mqtt/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/mqtt/CMakeLists.txt b/components/mqtt/CMakeLists.txt index e8373a9af2..d2bb24a78e 100644 --- a/components/mqtt/CMakeLists.txt +++ b/components/mqtt/CMakeLists.txt @@ -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()