Skip to content

Commit

Permalink
Reorganize mqtt build structure
Browse files Browse the repository at this point in the history
- Integrate build definitions from idf
- Changes CMakeLists to allow import
- Added host test from idf
- Added test code from idf
  • Loading branch information
euripedesrocha authored and egnor committed Dec 23, 2022
1 parent 6c3b7e2 commit cc12754
Show file tree
Hide file tree
Showing 28 changed files with 56 additions and 1,408 deletions.
18 changes: 18 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
set(srcs mqtt_client.c lib/mqtt_msg.c lib/mqtt_outbox.c lib/platform_esp32_idf.c)

if(CONFIG_MQTT_PROTOCOL_5)
list(APPEND srcs lib/mqtt5_msg.c mqtt5_client.c)
endif()

list(TRANSFORM srcs PREPEND ${CMAKE_CURRENT_LIST_DIR}/)
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/include
PRIV_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/lib/include
REQUIRES esp_event tcp_transport
PRIV_REQUIRES esp_timer http_parser esp_hw_support heap
KCONFIG ${CMAKE_CURRENT_LIST_DIR}/Kconfig
)
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")



7 changes: 7 additions & 0 deletions components/mqtt/Kconfig → Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ menu "ESP-MQTT Configurations"
help
MQTT task priority. Higher number denotes higher priority.

config MQTT_EVENT_QUEUE_SIZE
int "Number of queued events."
default 1
depends on MQTT_USE_CUSTOM_CONFIG
help
A value higher than 1 enables multiple queued events.

config MQTT_TASK_CORE_SELECTION_ENABLED
bool "Enable MQTT task core selection"
help
Expand Down
13 changes: 0 additions & 13 deletions components/mqtt/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion components/mqtt/esp-mqtt
Submodule esp-mqtt deleted from ae53d7
25 changes: 0 additions & 25 deletions components/mqtt/host_test/mocks/config.yaml

This file was deleted.

133 changes: 0 additions & 133 deletions components/mqtt/host_test/mocks/include/freertos/FreeRTOSConfig.h

This file was deleted.

177 changes: 0 additions & 177 deletions components/mqtt/host_test/mocks/include/freertos/portmacro.h

This file was deleted.

2 changes: 0 additions & 2 deletions components/mqtt/host_test/mocks/include/machine/endian.h

This file was deleted.

9 changes: 0 additions & 9 deletions components/mqtt/test/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit cc12754

Please sign in to comment.