We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e887004 commit 1752f2aCopy full SHA for 1752f2a
1 file changed
CMakeLists.txt
@@ -51,12 +51,20 @@ target_compile_definitions (debugprobe PRIVATE
51
52
option (DEBUG_ON_PICO "Compile firmware for the Pico instead of Debug Probe" OFF)
53
if (DEBUG_ON_PICO)
54
- target_compile_definitions (debugprobe PRIVATE
+ target_compile_definitions (debugprobe PRIVATE
55
DEBUG_ON_PICO=1
56
)
57
- set_target_properties(debugprobe PROPERTIES
58
- OUTPUT_NAME "debugprobe_on_pico"
59
- )
+ if (PICO_BOARD STREQUAL "pico")
+ set_target_properties(debugprobe PROPERTIES
+ OUTPUT_NAME "debugprobe_on_pico"
60
+ )
61
+ elseif (PICO_BOARD STREQUAL "pico2")
62
63
+ OUTPUT_NAME "debugprobe_on_pico2"
64
65
+ else ()
66
+ error("Unsupported board ${PICO_BOARD}" PICO_BOARD)
67
+ endif ()
68
endif ()
69
70
0 commit comments