Files
picomap/firmware/CMakeLists.txt

29 lines
910 B
CMake
Raw Permalink Normal View History

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)
set(CMAKE_CXX_STANDARD 23)
pico_sdk_init()
add_subdirectory(limen)
string(TIMESTAMP BUILD_EPOCH "%s" UTC)
math(EXPR VERSION_MAJOR "${BUILD_EPOCH} >> 16")
math(EXPR VERSION_MINOR "${BUILD_EPOCH} & 65535")
add_executable(picomap firmware.cpp)
target_link_libraries(picomap PRIVATE limen)
pico_set_binary_version(picomap MAJOR ${VERSION_MAJOR} MINOR ${VERSION_MINOR})
target_compile_definitions(picomap PRIVATE BUILD_EPOCH=${BUILD_EPOCH})
limen_configure_executable(picomap)
add_executable(picomap_test test.cpp)
target_link_libraries(picomap_test PRIVATE limen)
pico_set_binary_version(picomap_test MAJOR ${VERSION_MAJOR} MINOR ${VERSION_MINOR})
target_compile_definitions(picomap_test PRIVATE BUILD_EPOCH=${BUILD_EPOCH})
limen_configure_executable(picomap_test)