32 lines
690 B
CMake
32 lines
690 B
CMake
pico_sdk_init()
|
|
|
|
target_compile_options(GeographicLib INTERFACE -fexceptions -frtti)
|
|
|
|
add_executable(p-rad
|
|
src/main.cpp
|
|
${CORE_SOURCES}
|
|
${HAL_SOURCES}
|
|
)
|
|
|
|
target_compile_options(p-rad PRIVATE -ffunction-sections -fdata-sections)
|
|
target_link_options(p-rad PRIVATE -Wl,--gc-sections)
|
|
|
|
if(CMAKE_BUILD_TYPE EQUAL Release)
|
|
add_compile_options(-Os)
|
|
endif()
|
|
|
|
|
|
target_compile_definitions(p-rad PRIVATE PICO_BUILD)
|
|
target_include_directories(p-rad PRIVATE src)
|
|
target_link_libraries(p-rad
|
|
pico_stdlib
|
|
pico_cyw43_arch_lwip_threadsafe_background
|
|
hardware_rtc
|
|
GeographicLib
|
|
)
|
|
|
|
pico_enable_stdio_usb(p-rad 1)
|
|
pico_enable_stdio_uart(p-rad 0)
|
|
|
|
pico_add_extra_outputs(p-rad)
|