-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
64 lines (54 loc) · 1.57 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
cmake_minimum_required(VERSION 3.12)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
add_definitions ( -DRP2040=1 )
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR ARM)
set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CMAKE_PREFIX_PATH)
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
include($ENV{PICO_EXTRAS_PATH}/external/pico_extras_import.cmake)
project(GameTiger VERSION 1.0.0 LANGUAGES C CXX ASM)
set(PICO_BOARD gametiger_rp2040)
add_executable(${PROJECT_NAME}
core/common.cpp
core/LoRa/sx126x_hal.cpp
core/LoRa/sx126x.cpp
core/framebuffer.cpp
core/display.cpp
core/image.cpp
core/battery.cpp
core/keyboard.cpp
core/tilemap.cpp
core/level.cpp
core/LoRa/lora.cpp
screens/splashscreen.cpp
screens/menuscreen.cpp
screens/snakescreen.cpp
screens/gameboyscreen.cpp
screens/g2048screen.cpp
screens/tetrisscreen.cpp
screens/minescreen.cpp
screens/ticscreen.cpp
screens/aboutscreen.cpp
screens/settingsscreen.cpp
screens/pa2screen.cpp
main.cpp
)
pico_sdk_init()
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR} )
target_link_libraries(${PROJECT_NAME}
pico_stdlib
pico_multicore
hardware_spi
hardware_i2c
hardware_pwm
hardware_adc
hardware_dma
hardware_flash
hardware_sync
hardware_pll
)
target_compile_definitions(${PROJECT_NAME} PRIVATE PICO_CLOCK_AJDUST_PERI_CLOCK_WITH_SYS_CLOCK=1)
pico_enable_stdio_usb(${PROJECT_NAME} 1)
pico_enable_stdio_uart(${PROJECT_NAME} 0)
pico_add_extra_outputs(${PROJECT_NAME})