diff --git a/components/mosquitto/CMakeLists.txt b/components/mosquitto/CMakeLists.txt index 89d467ced..5e71918d4 100644 --- a/components/mosquitto/CMakeLists.txt +++ b/components/mosquitto/CMakeLists.txt @@ -92,7 +92,7 @@ target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format") # Enable linker wrapping for mosquitto_unpwd_check to allow connection callback interception # without modifying upstream code -target_link_options(${COMPONENT_LIB} PRIVATE "-Wl,--wrap=mosquitto_unpwd_check") +target_link_options(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=mosquitto_unpwd_check") # Some mosquitto source unconditionally define `_GNU_SOURCE` which collides with IDF build system # producing warning: "_GNU_SOURCE" redefined