Prep for other firmware
This commit is contained in:
parent
868a0562be
commit
3e1d6d2fe7
@ -4,32 +4,23 @@ include(pico_sdk_import.cmake)
|
|||||||
|
|
||||||
project(mtgcard)
|
project(mtgcard)
|
||||||
|
|
||||||
file(GLOB ICON_SOURCES CONFIGURE_DEPENDS src/icons/*.c)
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
add_executable(mtgcard
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
src/main.cpp
|
|
||||||
src/display.cpp
|
|
||||||
src/pixelstream.cpp
|
|
||||||
src/lib.cpp
|
|
||||||
src/flash.cpp
|
|
||||||
src/cardslot.cpp
|
|
||||||
src/icons.cpp
|
|
||||||
src/menu.cpp
|
|
||||||
src/manamenu.cpp
|
|
||||||
src/cmcmenu.cpp
|
|
||||||
src/selectmenu.cpp
|
|
||||||
src/cardmenu.cpp
|
|
||||||
|
|
||||||
src/usb_descriptors.c
|
|
||||||
|
|
||||||
${ICON_SOURCES}
|
|
||||||
)
|
|
||||||
|
|
||||||
pico_sdk_init()
|
pico_sdk_init()
|
||||||
|
|
||||||
target_include_directories(mtgcard PUBLIC include)
|
add_library(devicelib STATIC
|
||||||
|
src/display.cpp
|
||||||
|
src/flash.cpp
|
||||||
|
src/lib.cpp
|
||||||
|
src/pixelstream.cpp
|
||||||
|
src/usb_descriptors.c
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(mtgcard PUBLIC
|
target_include_directories(devicelib PUBLIC include)
|
||||||
|
|
||||||
|
target_link_libraries(devicelib PUBLIC
|
||||||
pico_stdlib
|
pico_stdlib
|
||||||
hardware_spi
|
hardware_spi
|
||||||
hardware_dma
|
hardware_dma
|
||||||
@ -39,8 +30,8 @@ target_link_libraries(mtgcard PUBLIC
|
|||||||
pico_unique_id
|
pico_unique_id
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_definitions(mtgcard PRIVATE
|
target_compile_definitions(devicelib PUBLIC
|
||||||
PICO_ENTER_USB_BOOT_ON_EXIT=1
|
PICO_ENTER_USB_BOOT_ON_EXIT=1
|
||||||
)
|
)
|
||||||
|
|
||||||
pico_add_extra_outputs(mtgcard)
|
add_subdirectory(programs)
|
||||||
|
|||||||
3
programs/CMakeLists.txt
Normal file
3
programs/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
|
add_subdirectory(mtgcard)
|
||||||
22
programs/mtgcard/CMakeLists.txt
Normal file
22
programs/mtgcard/CMakeLists.txt
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
|
file(GLOB ICON_SOURCES CONFIGURE_DEPENDS src/icons/*.c)
|
||||||
|
|
||||||
|
add_executable(mtgcard
|
||||||
|
src/main.cpp
|
||||||
|
src/cardslot.cpp
|
||||||
|
src/icons.cpp
|
||||||
|
src/menu.cpp
|
||||||
|
src/manamenu.cpp
|
||||||
|
src/cmcmenu.cpp
|
||||||
|
src/selectmenu.cpp
|
||||||
|
src/cardmenu.cpp
|
||||||
|
|
||||||
|
${ICON_SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(mtgcard PRIVATE include)
|
||||||
|
|
||||||
|
target_link_libraries(mtgcard PRIVATE devicelib)
|
||||||
|
|
||||||
|
pico_add_extra_outputs(mtgcard)
|
||||||
Loading…
x
Reference in New Issue
Block a user