2022-03-11 09:21:09 +00:00
|
|
|
function (copy_module TARGET SRC DST)
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/../modules/${DST}.py
|
|
|
|
|
|
|
|
COMMAND
|
|
|
|
cp ${SRC} ${CMAKE_CURRENT_BINARY_DIR}/../modules/${DST}.py
|
|
|
|
|
|
|
|
DEPENDS ${src}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_sources(${TARGET} INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/../modules/${DST}.py)
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
# Create a dummy usermod to hang our .py copies from
|
|
|
|
add_library(usermod_modules_py INTERFACE)
|
|
|
|
target_link_libraries(usermod INTERFACE usermod_modules_py)
|
|
|
|
|
|
|
|
# .py files to copy from modules_py to ports/rp2/modules
|
2022-06-13 15:53:22 +01:00
|
|
|
#copy_module(usermod_modules_py ${CMAKE_CURRENT_LIST_DIR}/picosystem.py picosystem)
|
2022-03-11 09:21:09 +00:00
|
|
|
copy_module(usermod_modules_py ${CMAKE_CURRENT_LIST_DIR}/pimoroni.py pimoroni)
|
2022-11-04 17:23:30 +00:00
|
|
|
copy_module(usermod_modules_py ${CMAKE_CURRENT_LIST_DIR}/gfx_pack.py gfx_pack)
|
2022-07-01 07:12:35 +01:00
|
|
|
if(PICO_BOARD STREQUAL "pico_w")
|
|
|
|
copy_module(usermod_modules_py ${CMAKE_CURRENT_LIST_DIR}/automation.py automation)
|
|
|
|
copy_module(usermod_modules_py ${CMAKE_CURRENT_LIST_DIR}/inventor.py inventor)
|
|
|
|
endif()
|