Rework build targets such that: (#1211)
1. Make sure Pico SDK libraries have the correct dependencies on other SDK libraries 2. Pico SDK libraries all have _headers variants to include the headers. This may facilitate building user STATIC libraries without pulling in SDK code, though care will still need to be taken w.r.t. values of #defines 3. Make sure the _headers versions also have the correct dependencies Note: There are a few exceptions to 1. for some non code libraries like pico_standard_link and pico_cxx_options
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
if (TARGET tinyusb_device_unmarked)
|
||||
pico_add_impl_library(pico_stdio_usb)
|
||||
pico_add_library(pico_stdio_usb)
|
||||
|
||||
target_include_directories(pico_stdio_usb INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include)
|
||||
target_include_directories(pico_stdio_usb_headers INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include)
|
||||
|
||||
target_sources(pico_stdio_usb INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}/reset_interface.c
|
||||
@ -9,11 +9,13 @@ if (TARGET tinyusb_device_unmarked)
|
||||
${CMAKE_CURRENT_LIST_DIR}/stdio_usb_descriptors.c
|
||||
)
|
||||
|
||||
target_link_libraries(pico_stdio_usb INTERFACE
|
||||
tinyusb_device_unmarked
|
||||
pico_mirrored_target_link_libraries(pico_stdio_usb INTERFACE
|
||||
pico_stdio
|
||||
pico_time
|
||||
pico_unique_id
|
||||
pico_usb_reset_interface_headers
|
||||
pico_usb_reset_interface
|
||||
)
|
||||
target_link_libraries(pico_stdio_usb INTERFACE
|
||||
tinyusb_device_unmarked
|
||||
)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user