From e6c0538d55f411bedeaaf1634cdfcdca1915487e Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 21 Sep 2023 16:25:42 +0200 Subject: [PATCH] fix(esp_mqtt_cxx): reference protocol_examples_common from IDF This makes the example project usable from the component registry --- components/esp_mqtt_cxx/examples/ssl/CMakeLists.txt | 5 ----- components/esp_mqtt_cxx/examples/ssl/main/idf_component.yml | 4 +++- components/esp_mqtt_cxx/examples/tcp/CMakeLists.txt | 5 ----- components/esp_mqtt_cxx/examples/tcp/main/idf_component.yml | 4 +++- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/components/esp_mqtt_cxx/examples/ssl/CMakeLists.txt b/components/esp_mqtt_cxx/examples/ssl/CMakeLists.txt index d40b15ccb..1548cb286 100644 --- a/components/esp_mqtt_cxx/examples/ssl/CMakeLists.txt +++ b/components/esp_mqtt_cxx/examples/ssl/CMakeLists.txt @@ -2,11 +2,6 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# (Not part of the boilerplate) This example uses an extra component for common -# functions such as Wi-Fi and Ethernet connection. -set(EXTRA_COMPONENT_DIRS - "../../../../common_components/protocol_examples_common") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(mqtt_ssl_cxx) diff --git a/components/esp_mqtt_cxx/examples/ssl/main/idf_component.yml b/components/esp_mqtt_cxx/examples/ssl/main/idf_component.yml index dbfc8fa8e..3addb485a 100644 --- a/components/esp_mqtt_cxx/examples/ssl/main/idf_component.yml +++ b/components/esp_mqtt_cxx/examples/ssl/main/idf_component.yml @@ -2,5 +2,7 @@ dependencies: ## Required IDF version idf: ">=5.0" espressif/esp_mqtt_cxx: - version: "^0.1.0" + version: "~0" override_path: "../../../" + protocol_examples_common: + path: ${IDF_PATH}/examples/common_components/protocol_examples_common diff --git a/components/esp_mqtt_cxx/examples/tcp/CMakeLists.txt b/components/esp_mqtt_cxx/examples/tcp/CMakeLists.txt index 0446c56da..baf71459b 100644 --- a/components/esp_mqtt_cxx/examples/tcp/CMakeLists.txt +++ b/components/esp_mqtt_cxx/examples/tcp/CMakeLists.txt @@ -2,10 +2,5 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# (Not part of the boilerplate) -# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection. -set(EXTRA_COMPONENT_DIRS - "../../../../common_components/protocol_examples_common") - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(mqtt_tcp_cxx) diff --git a/components/esp_mqtt_cxx/examples/tcp/main/idf_component.yml b/components/esp_mqtt_cxx/examples/tcp/main/idf_component.yml index dbfc8fa8e..3addb485a 100644 --- a/components/esp_mqtt_cxx/examples/tcp/main/idf_component.yml +++ b/components/esp_mqtt_cxx/examples/tcp/main/idf_component.yml @@ -2,5 +2,7 @@ dependencies: ## Required IDF version idf: ">=5.0" espressif/esp_mqtt_cxx: - version: "^0.1.0" + version: "~0" override_path: "../../../" + protocol_examples_common: + path: ${IDF_PATH}/examples/common_components/protocol_examples_common