forked from raspberrypi/pico-examples
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
40 lines (38 loc) · 1.47 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
if (NOT TEST_TCP_SERVER_IP)
message("Skipping tcp_client example as TEST_TCP_SERVER_IP is not defined")
else()
add_executable(picow_tcpip_client_background
picow_tcp_client.c
)
target_compile_definitions(picow_tcpip_client_background PRIVATE
WIFI_SSID=\"${WIFI_SSID}\"
WIFI_PASSWORD=\"${WIFI_PASSWORD}\"
TEST_TCP_SERVER_IP=\"${TEST_TCP_SERVER_IP}\"
)
target_include_directories(picow_tcpip_client_background PRIVATE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts
)
target_link_libraries(picow_tcpip_client_background
pico_cyw43_arch_lwip_threadsafe_background
pico_stdlib
)
pico_add_extra_outputs(picow_tcpip_client_background)
add_executable(picow_tcpip_client_poll
picow_tcp_client.c
)
target_compile_definitions(picow_tcpip_client_poll PRIVATE
WIFI_SSID=\"${WIFI_SSID}\"
WIFI_PASSWORD=\"${WIFI_PASSWORD}\"
TEST_TCP_SERVER_IP=\"${TEST_TCP_SERVER_IP}\"
)
target_include_directories(picow_tcpip_client_poll PRIVATE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/.. # for our common lwipopts
)
target_link_libraries(picow_tcpip_client_poll
pico_cyw43_arch_lwip_poll
pico_stdlib
)
pico_add_extra_outputs(picow_tcpip_client_poll)
endif()