Skip to content

Commit f195b64

Browse files
committed
fix(wifi_remote): Fix issues when building the same file twice
Closes #84
1 parent 59f6fc2 commit f195b64

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

components/esp_wifi_remote/CMakeLists.txt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
if(NOT CONFIG_ESP_WIFI_ENABLED AND NOT CONFIG_ESP_HOST_WIFI_ENABLED)
2-
set(src_wifi_is_remote esp_wifi_remote.c esp_wifi_remote_net.c)
2+
set(wifi_remote_sources esp_wifi_remote.c esp_wifi_remote_net.c)
3+
else()
4+
set(wifi_remote_sources esp_wifi_remote_net2.c)
35
endif()
46

57
idf_component_register(INCLUDE_DIRS include
6-
SRCS ${src_wifi_is_remote}
7-
${src_wifi_remote_eppp}
8-
dummy_src.c # Prevents making this component potentially INTERFACE only
8+
SRCS ${wifi_remote_sources}
99
REQUIRES esp_event esp_netif
1010
PRIV_REQUIRES esp_wifi esp-tls vfs)
1111

12-
1312
set(IDF_VER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/idf_v${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}")
1413

1514
# Check if we're on tagged version of ESP-IDF and if we need to supply specific version
@@ -41,10 +40,6 @@ if(CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED)
4140
endif()
4241
endif()
4342

44-
if(CONFIG_ESP_WIFI_ENABLED OR CONFIG_ESP_HOST_WIFI_ENABLED)
45-
list(APPEND wifi_sources "esp_wifi_remote_net2.c")
46-
endif()
47-
4843
target_include_directories(${COMPONENT_LIB} PUBLIC ${IDF_VER_DIR}/include)
4944
target_sources(${COMPONENT_LIB} PRIVATE ${src_wifi_remote_weak}
5045
${src_wifi_with_remote}

0 commit comments

Comments
 (0)