2026-04-02 22:15:10 +09:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
|
|
|
|
|
|
set(PICO_BOARD pico2)
|
|
|
|
|
|
|
|
|
|
include(pico_sdk_import.cmake)
|
|
|
|
|
|
|
|
|
|
project(picomap C CXX ASM)
|
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
2026-04-03 16:59:11 +09:00
|
|
|
set(CMAKE_CXX_STANDARD 23)
|
2026-04-02 22:15:10 +09:00
|
|
|
pico_sdk_init()
|
|
|
|
|
|
2026-04-19 17:38:29 -07:00
|
|
|
add_subdirectory(limen)
|
2026-04-02 22:15:10 +09:00
|
|
|
|
2026-04-12 09:02:31 +09:00
|
|
|
string(TIMESTAMP BUILD_EPOCH "%s" UTC)
|
|
|
|
|
math(EXPR VERSION_MAJOR "${BUILD_EPOCH} >> 16")
|
|
|
|
|
math(EXPR VERSION_MINOR "${BUILD_EPOCH} & 65535")
|
2026-04-19 17:38:29 -07:00
|
|
|
|
|
|
|
|
add_executable(picomap firmware.cpp)
|
|
|
|
|
target_link_libraries(picomap PRIVATE limen)
|
2026-04-12 09:02:31 +09:00
|
|
|
pico_set_binary_version(picomap MAJOR ${VERSION_MAJOR} MINOR ${VERSION_MINOR})
|
|
|
|
|
target_compile_definitions(picomap PRIVATE BUILD_EPOCH=${BUILD_EPOCH})
|
2026-04-19 17:38:29 -07:00
|
|
|
limen_configure_executable(picomap)
|
2026-04-05 21:48:47 +09:00
|
|
|
|
2026-04-19 17:38:29 -07:00
|
|
|
add_executable(picomap_test test.cpp)
|
|
|
|
|
target_link_libraries(picomap_test PRIVATE limen)
|
2026-04-12 09:02:31 +09:00
|
|
|
pico_set_binary_version(picomap_test MAJOR ${VERSION_MAJOR} MINOR ${VERSION_MINOR})
|
|
|
|
|
target_compile_definitions(picomap_test PRIVATE BUILD_EPOCH=${BUILD_EPOCH})
|
2026-04-19 17:38:29 -07:00
|
|
|
limen_configure_executable(picomap_test)
|