diff --git a/components/mqtt/CMakeLists.txt b/components/mqtt/CMakeLists.txt index 85f63cc..1c30e3a 100644 --- a/components/mqtt/CMakeLists.txt +++ b/components/mqtt/CMakeLists.txt @@ -1,10 +1,7 @@ -set(COMPONENT_ADD_INCLUDEDIRS esp-mqtt/include) -set(COMPONENT_PRIV_INCLUDEDIRS "esp-mqtt/lib/include") -set(COMPONENT_SRCS "esp-mqtt/mqtt_client.c" - "esp-mqtt/lib/mqtt_msg.c" - "esp-mqtt/lib/mqtt_outbox.c" - "esp-mqtt/lib/platform_esp32_idf.c") - -set(COMPONENT_REQUIRES lwip nghttp mbedtls tcp_transport) - -register_component() +idf_component_register(SRCS "esp-mqtt/mqtt_client.c" + "esp-mqtt/lib/mqtt_msg.c" + "esp-mqtt/lib/mqtt_outbox.c" + "esp-mqtt/lib/platform_esp32_idf.c" + INCLUDE_DIRS esp-mqtt/include + PRIV_INCLUDE_DIRS "esp-mqtt/lib/include" + REQUIRES lwip nghttp mbedtls tcp_transport)