Skip to content

Commit e01e67e

Browse files
ascillatodavid-cermak
authored andcommitted
feat(mdns): Add version keys
1 parent 37f84ee commit e01e67e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

components/mdns/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ if(${target} STREQUAL "linux")
3434
target_link_libraries(${COMPONENT_LIB} PRIVATE "-lbsd")
3535
endif()
3636

37-
3837
if(CONFIG_ETH_ENABLED)
3938
idf_component_optional_requires(PRIVATE esp_eth)
4039
endif()
40+
41+
idf_component_get_property(MDNS_VERSION ${COMPONENT_NAME} COMPONENT_VERSION)
42+
target_compile_definitions(${COMPONENT_LIB} PUBLIC "-DESP_MDNS_VERSION_NUMBER=\"${MDNS_VERSION}\"")

components/mdns/examples/query_advertise/main/mdns_example_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ void app_main(void)
314314
ESP_ERROR_CHECK(esp_netif_init());
315315
ESP_ERROR_CHECK(esp_event_loop_create_default());
316316

317+
ESP_LOGI(TAG, "mDNS Ver: %s", ESP_MDNS_VERSION_NUMBER);
318+
317319
initialise_mdns();
318320

319321
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.

0 commit comments

Comments
 (0)