Skip to content

Commit f13a99a

Browse files
committed
fix(wifi_remote): Inject wifi headers only if no wifi/wifi-host
1 parent 23441fc commit f13a99a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

components/esp_wifi_remote/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ target_sources(${COMPONENT_LIB} ${TARGET_SOURCE_TYPE} ${src_wifi_re
5151
${src_wifi_with_remote}
5252
${wifi_sources})
5353

54-
# Update wifi include directories to prepend the injected dir with modified headers supporting SLAVE capability
55-
get_target_property(original_wifi_dirs ${wifi} INTERFACE_INCLUDE_DIRECTORIES)
56-
set(updated_wifi_dirs "${IDF_VER_DIR}/include/injected" ${original_wifi_dirs})
57-
set_target_properties(${wifi} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${updated_wifi_dirs}")
54+
if(NOT CONFIG_ESP_WIFI_ENABLED AND NOT CONFIG_ESP_HOST_WIFI_ENABLED)
55+
# Update wifi include directories to prepend the injected dir with modified headers supporting SLAVE capability
56+
get_target_property(original_wifi_dirs ${wifi} INTERFACE_INCLUDE_DIRECTORIES)
57+
set(updated_wifi_dirs "${IDF_VER_DIR}/include/injected" ${original_wifi_dirs})
58+
set_target_properties(${wifi} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${updated_wifi_dirs}")
59+
endif()
5860

5961
target_link_libraries(${wifi} PUBLIC ${COMPONENT_LIB})

0 commit comments

Comments
 (0)