Move to Tinyusb 0.10.0 (still with RP patches) (#462)
Most build related items have moved into <tinyusb>/hw/bsp/rp2040/family.cmake which is now the source of truth
force merging as same code save submodule was already reviewed
diff --git a/pico_sdk_init.cmake b/pico_sdk_init.cmake
index b3e054c..f6b6f81 100644
--- a/pico_sdk_init.cmake
+++ b/pico_sdk_init.cmake
@@ -53,6 +53,7 @@
message(WARNING "pico_sdk_init() should be called after the project is created (and languages added)")
endif()
add_subdirectory(${PICO_SDK_PATH} pico-sdk)
+ pico_is_top_level_project(ISTOP)
endmacro()
macro(add_sub_list_dirs var)
@@ -70,11 +71,24 @@
endforeach()
endmacro()
+ macro(pico_register_common_scope_var NAME)
+ if (NOT ${NAME} IN_LIST PICO_PROMOTE_COMMON_SCOPE_VARS)
+ list(APPEND PICO_PROMOTE_COMMON_SCOPE_VARS ${NAME})
+ endif()
+ endmacro()
+
+ set(PICO_PROMOTE_COMMON_SCOPE_VARS
+ PICO_INCLUDE_DIRS
+ PICO_SDK_POST_LIST_DIRS
+ PICO_SDK_POST_LIST_FILES
+ PICO_CONFIG_HEADER_FILES
+ PICO_RP2040_CONFIG_HEADER_FILES
+ )
+
macro(pico_promote_common_scope_vars)
- set(PICO_INCLUDE_DIRS ${PICO_INCLUDE_DIRS} PARENT_SCOPE)
- set(PICO_SDK_POST_LIST_DIRS ${PICO_SDK_POST_LIST_DIRS} PARENT_SCOPE)
- set(PICO_SDK_POST_LIST_FILES ${PICO_SDK_POST_LIST_FILES} PARENT_SCOPE)
- set(PICO_CONFIG_HEADER_FILES ${PICO_CONFIG_HEADER_FILES} PARENT_SCOPE)
- set(PICO_RP2040_CONFIG_HEADER_FILES ${PICO_RP2040_CONFIG_HEADER_FILES} PARENT_SCOPE)
+ set(PICO_PROMOTE_COMMON_SCOPE_VARS ${PICO_PROMOTE_COMMON_SCOPE_VARS} PARENT_SCOPE)
+ foreach(VAR IN LISTS PICO_PROMOTE_COMMON_SCOPE_VARS)
+ SET(${VAR} ${${VAR}} PARENT_SCOPE)
+ endforeach()
endmacro()
endif()