kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Merge pull request #1 from pimoroni/usermod-support
Add usermod.cmake files for building against upstream usermod micropyhon usermod branchpull/10/head
commit
0e80911d13
|
@ -0,0 +1,21 @@
|
|||
add_library(usermod_pico_display INTERFACE)
|
||||
|
||||
target_sources(usermod_pico_display INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}/pico_display.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/pico_display.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_display/pico_display.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../drivers/st7789/st7789.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_graphics/pico_graphics.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_graphics/types.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_graphics/font_data.cpp
|
||||
)
|
||||
|
||||
target_include_directories(usermod_pico_display INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(usermod_pico_display INTERFACE
|
||||
-DMODULE_PICODISPLAY_ENABLED=1
|
||||
)
|
||||
|
||||
target_link_libraries(usermod INTERFACE usermod_pico_display)
|
|
@ -0,0 +1,17 @@
|
|||
add_library(usermod_pico_rgb_keypad INTERFACE)
|
||||
|
||||
target_sources(usermod_pico_rgb_keypad INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}/pico_rgb_keypad.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/pico_rgb_keypad.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_rgb_keypad/pico_rgb_keypad.cpp
|
||||
)
|
||||
|
||||
target_include_directories(usermod_pico_rgb_keypad INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(usermod_pico_rgb_keypad INTERFACE
|
||||
-DMODULE_PICOKEYPAD_ENABLED=1
|
||||
)
|
||||
|
||||
target_link_libraries(usermod INTERFACE usermod_pico_rgb_keypad)
|
|
@ -0,0 +1,17 @@
|
|||
add_library(usermod_pico_scroll INTERFACE)
|
||||
|
||||
target_sources(usermod_pico_scroll INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}/pico_scroll.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/pico_scroll.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_scroll/pico_scroll.cpp
|
||||
)
|
||||
|
||||
target_include_directories(usermod_pico_scroll INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(usermod_pico_scroll INTERFACE
|
||||
-DMODULE_PICOSCROLL_ENABLED=1
|
||||
)
|
||||
|
||||
target_link_libraries(usermod INTERFACE usermod_pico_scroll)
|
|
@ -0,0 +1,19 @@
|
|||
add_library(usermod_pico_unicorn INTERFACE)
|
||||
|
||||
target_sources(usermod_pico_unicorn INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}/pico_unicorn.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/pico_unicorn.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_unicorn/pico_unicorn.cpp
|
||||
)
|
||||
|
||||
pico_generate_pio_header(usermod_pico_unicorn ${CMAKE_CURRENT_LIST_DIR}/../../../libraries/pico_unicorn/pico_unicorn.pio)
|
||||
|
||||
target_include_directories(usermod_pico_unicorn INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(usermod_pico_unicorn INTERFACE
|
||||
-DMODULE_PICOUNICORN_ENABLED=1
|
||||
)
|
||||
|
||||
target_link_libraries(usermod INTERFACE usermod_pico_unicorn)
|
|
@ -0,0 +1,4 @@
|
|||
include(${CMAKE_CURRENT_LIST_DIR}/pico_scroll/usermod.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/pico_rgb_keypad/usermod.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/pico_unicorn/usermod.cmake)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/pico_display/usermod.cmake)
|
Ładowanie…
Reference in New Issue