-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
54 lines (44 loc) · 1.81 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
cmake_minimum_required(VERSION 3.12)
# Change your executable name to something creative!
set(PROJECT_NAME "LibGUI")
include(pimoroni_pico_import.cmake)
include(pico_sdk_import.cmake)
# Gooey boilerplate
project(${PROJECT_NAME} C CXX ASM)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
pico_sdk_init()
add_subdirectory(examples)
set(NAME gui)
add_library(${NAME} STATIC
${CMAKE_CURRENT_LIST_DIR}/src/drawable.cpp
${CMAKE_CURRENT_LIST_DIR}/src/view.cpp
${CMAKE_CURRENT_LIST_DIR}/src/view_controller.cpp
${CMAKE_CURRENT_LIST_DIR}/src/widgets/divider_widget.cpp
${CMAKE_CURRENT_LIST_DIR}/src/widgets/list_widget.cpp
${CMAKE_CURRENT_LIST_DIR}/src/widgets/text_widget.cpp
${CMAKE_CURRENT_LIST_DIR}/src/widgets/qrcode_widget.cpp
${CMAKE_CURRENT_LIST_DIR}/src/drivers/button.cpp
# ${CMAKE_CURRENT_LIST_DIR}/src/drivers/led.cpp
${CMAKE_CURRENT_LIST_DIR}/src/drivers/rp2040/sio_pin.cpp
${CMAKE_CURRENT_LIST_DIR}/src/drivers/rp2040/gpio_pin.cpp
)
target_include_directories(${NAME} PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
${PIMORONI_PICO_PATH}/
)
# Include required libraries
# This assumes `pimoroni-pico` is stored alongside your project
include(${PIMORONI_PICO_PATH}/common/pimoroni_i2c.cmake)
include(${PIMORONI_PICO_PATH}/common/pimoroni_bus.cmake)
include(${PIMORONI_PICO_PATH}/libraries/bitmap_fonts/bitmap_fonts.cmake)
include(${PIMORONI_PICO_PATH}/libraries/hershey_fonts/hershey_fonts.cmake)
include(${PIMORONI_PICO_PATH}/libraries/pico_explorer/pico_explorer.cmake)
include(${PIMORONI_PICO_PATH}/libraries/pico_display/pico_display.cmake)
include(${PIMORONI_PICO_PATH}/drivers/rgbled/rgbled.cmake)
include(${PIMORONI_PICO_PATH}/drivers/button/button.cmake)
# include(${PIMORONI_PICO_PATH}/drivers/st7789/st7789)
target_link_libraries(${NAME} PUBLIC
pico_display
pico_explorer
)