esp-idf/tools/mocks/esp_wifi/CMakeLists.txt
Sarvesh Bodakhe 0154e81d87 feat(wifi): Sync public header files between ESP-IDF and Wi-Fi driver
- Updated WiFi libraries based on the IDF changes
- Renamed esp_wifi_native.h to esp_wifi_types_native.h
- Reverted forward declarations of native wifi types and HE types
- Forward declare as opaque structs only if we don't have native types (csi and ctrl_packet types)
2024-02-01 12:17:43 +01:00

27 lines
1.4 KiB
CMake

# NOTE: This kind of mocking currently works on Linux targets only.
# On Espressif chips, too many dependencies are missing at the moment.
message(STATUS "building ESP WIFI MOCKS")
idf_component_get_property(original_esp_wifi_dir esp_wifi COMPONENT_OVERRIDEN_DIR)
set(include_dirs
"${original_esp_wifi_dir}/include" "${original_esp_wifi_dir}/include/local")
idf_component_mock(INCLUDE_DIRS ${include_dirs}
REQUIRES esp_event esp_netif lwip
MOCK_HEADER_FILES ${original_esp_wifi_dir}/include/esp_wifi.h
${original_esp_wifi_dir}/include/esp_wifi_default.h
${original_esp_wifi_dir}/include/esp_wifi_netif.h
${original_esp_wifi_dir}/include/esp_wifi_he.h
${original_esp_wifi_dir}/include/esp_wifi_ap_get_sta_list.h
${original_esp_wifi_dir}/include/esp_smartconfig.h
${original_esp_wifi_dir}/include/esp_mesh.h
${original_esp_wifi_dir}/include/esp_now.h
${original_esp_wifi_dir}/include/smartconfig_ack.h)
# -Warray-parameter has been introduced in GCC 11
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL "11.0.0")
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-array-parameter)
endif()
target_sources(${COMPONENT_LIB} PRIVATE "global_symbols_mock.c")