diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/sbc_harness/CMakeLists.txt | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/cmd/sbc_harness/CMakeLists.txt b/cmd/sbc_harness/CMakeLists.txt index 9a84640..06444d2 100644 --- a/cmd/sbc_harness/CMakeLists.txt +++ b/cmd/sbc_harness/CMakeLists.txt @@ -7,7 +7,7 @@ if (PICO_PLATFORM STREQUAL "rp2040") # Compile ###################################################################### -add_library(sbc_harness_objs +add_library(sbc_harness_objs OBJECT main.c usb_keyboard.c ) @@ -36,8 +36,17 @@ add_stack_analysis(sbc_harness_stack.c sbc_harness_objs) # Link ######################################################################### add_executable(sbc_harness) -target_link_libraries(sbc_harness sbc_harness_objs) -target_sources(sbc_harness PRIVATE sbc_harness_stack.c) +set_source_files_properties("$<TARGET_OBJECTS:sbc_harness_objs>" PROPERTIES + EXTERNAL_OBJECT true + GENERATED true +) +target_sources(sbc_harness PRIVATE + sbc_harness_stack.c + "$<TARGET_OBJECTS:sbc_harness_objs>" +) +target_link_libraries(sbc_harness + pico_standard_link +) pico_add_extra_outputs(sbc_harness) # create .map/.bin/.hex/.uf2 files in addition to .elf pico_set_program_url(sbc_harness "https://git.lukeshu.com/sbc-harness") |