-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
38 lines (29 loc) · 846 Bytes
/
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
cmake_minimum_required(VERSION 3.13)
include($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)
include($ENV{PICO_EXTRAS_PATH}/external/pico_extras_import.cmake)
set(project_name "pico_battery_op" C CXX)
project(${project_name})
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
pico_sdk_init()
add_subdirectory(lib/pico-ssd1306)
add_subdirectory(lib/pico_stdio_usb_revised)
set(bin_name ${PROJECT_NAME})
add_executable(${bin_name}
main.cpp
power_management.cpp
)
#pico_enable_stdio_usb(${bin_name} 1)
#pico_enable_stdio_uart(${bin_name} 1)
target_link_libraries(${bin_name}
hardware_adc
hardware_sleep
hardware_uart
hardware_watchdog
pico_runtime_init
pico_stdlib
pico-ssd1306
pico_stdio_usb_revised
)
target_include_directories(${bin_name} INTERFACE lib/)
pico_add_extra_outputs(${bin_name})