forked from jasonfrowe/2600MultiCart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
69 lines (50 loc) · 1.62 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
cmake_minimum_required(VERSION 3.21)
# Pull in SDK (must be before project)
# include(pico_sdk_import.cmake)
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
# project(PICO_ROM CXX C ASM)
project(PICO_ROM CXX C ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
# Initialize the SDK
pico_sdk_init()
## Pico with WIFI
add_executable(pico_rom_wifi)
target_compile_definitions(pico_rom_wifi PRIVATE
WIFI_SSID=\"${WIFI_SSID}\"
WIFI_PASSWORD=\"${WIFI_PASSWORD}\"
TEST_TCP_SERVER_IP=\"${TEST_TCP_SERVER_IP}\"
)
target_sources(pico_rom_wifi PRIVATE rom_wifi.c)
target_include_directories(pico_rom_wifi PRIVATE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/..
)
target_link_libraries(pico_rom_wifi PRIVATE
pico_stdlib
hardware_pio
hardware_adc
pico_cyw43_arch_lwip_threadsafe_background # Specific for PICO_W
pico_lwip_mqtt
pico_multicore
)
pico_add_extra_outputs(pico_rom_wifi)
# Enable USB output, disable UART output.
pico_enable_stdio_usb(pico_rom_wifi 1)
pico_enable_stdio_uart(pico_rom_wifi 0)
## PICO no WIFI version
add_executable(pico_rom)
target_sources(pico_rom PRIVATE rom.c)
target_include_directories(pico_rom PRIVATE
${CMAKE_CURRENT_LIST_DIR}
${CMAKE_CURRENT_LIST_DIR}/..
)
target_link_libraries(pico_rom PRIVATE
pico_stdlib
hardware_pio
hardware_adc
)
pico_add_extra_outputs(pico_rom)
# Enable USB output, disable UART output.
# pico_enable_stdio_usb(pico_rom 1)
# pico_enable_stdio_uart(pico_rom 0)