-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
106 lines (86 loc) · 2.68 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
cmake_minimum_required(VERSION 3.5...3.27)
set(CMAKE_C_STANDARD 23)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_VERBOSE_MAKEFILE OFF)
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE)
set(PICO_SDK_PATH ~/src/pico-sdk)
set(PICO_BOARD pico)
set(PICO_PLATFORM rp2040)
set(PICO_STDIO_DEFAULT_CRLF 1)
set(PICO_STDIO_USB 1)
include(~/src/pico-sdk/pico_sdk_init.cmake)
add_compile_options( -Wall
-Wno-unused
-Wmisleading-indentation
-Wno-strict-aliasing
-Wno-format
-Wno-maybe-uninitialized
)
project(C_pico_skelett ASM C CXX)
pico_sdk_init()
add_executable(skelett)
set_target_properties(skelett PROPERTIES C_STANDARD 23
C_STANDARD_REQUIRED ON
)
add_subdirectory( pico-displayDrivs
pico-displayDrivs/build
)
#add_library(st7735 source/lib-st7735/src/ST7735_TFT.c
# source/lib-st7735/src/hw.c
#)
#target_compile_definitions(skelett PUBLIC PICO_STDIO_USB_CONNECT_WAIT_TIMEOUT_MS=1000
#)
#target_compile_definitions(st7735 PUBLIC SPI_TFT_PORT=spi0
# PIN_TFT_CS=17
# PIN_TFT_DC=20
# PIN_TFT_RST=21
# TFT_ENABLE_RED
# TFT_ENABLE_BLACK
# TFT_ENABLE_GREEN
# TFT_ENABLE_GENERIC
# TFT_ENABLE_TEXT
# TFT_ENABLE_RESET
# TFT_ENABLE_SCROLL
# TFT_ENABLE_SHAPES
# TFT_ENABLE_ROTATE
#)
#target_link_libraries(st7735 hardware_gpio
# hardware_spi
# pico_time
#)
target_link_libraries(skelett hardware_gpio
hardware_spi
hardware_timer
pico_bootsel_via_double_reset
pico_multicore
pico_stdio_usb
pico_stdlib
pico_time
pico_util
st7735
gfx
)
pico_add_extra_outputs(skelett)
target_sources(skelett PUBLIC source/config.c
source/debug.c
source/globals.c
source/input.c
source/module1.c
source/module2.c
source/skelett.c
)
set_source_files_properties(source/config.c PROPERTIES COMPILE_DEFINITIONS SRC_FILE_config)
set_source_files_properties(source/debug.c PROPERTIES COMPILE_DEFINITIONS SRC_FILE_debug)
set_source_files_properties(source/globals.c PROPERTIES COMPILE_DEFINITIONS SRC_FILE_globals)
set_source_files_properties(source/input.c PROPERTIES COMPILE_DEFINITIONS SRC_FILE_input)
set_source_files_properties(source/module1.c PROPERTIES COMPILE_DEFINITIONS SRC_FILE_module1)
set_source_files_properties(source/module2.c PROPERTIES COMPILE_DEFINITIONS SRC_FILE_module2)
target_include_directories(skelett BEFORE PUBLIC
source
pico-displayDrivs/st7735
pico-displayDrivs/gfx
# source/lib-st7735/include
)
#target_include_directories(st7735 BEFORE PUBLIC
# source/lib-st7735/include
#)