Skip to content

Commit 1752f2a

Browse files
committed
CMmakeLists.txt: add pico2 variant target naming
1 parent e887004 commit 1752f2a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

CMakeLists.txt

+12-4
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,20 @@ target_compile_definitions (debugprobe PRIVATE
5151

5252
option (DEBUG_ON_PICO "Compile firmware for the Pico instead of Debug Probe" OFF)
5353
if (DEBUG_ON_PICO)
54-
target_compile_definitions (debugprobe PRIVATE
54+
target_compile_definitions (debugprobe PRIVATE
5555
DEBUG_ON_PICO=1
5656
)
57-
set_target_properties(debugprobe PROPERTIES
58-
OUTPUT_NAME "debugprobe_on_pico"
59-
)
57+
if (PICO_BOARD STREQUAL "pico")
58+
set_target_properties(debugprobe PROPERTIES
59+
OUTPUT_NAME "debugprobe_on_pico"
60+
)
61+
elseif (PICO_BOARD STREQUAL "pico2")
62+
set_target_properties(debugprobe PROPERTIES
63+
OUTPUT_NAME "debugprobe_on_pico2"
64+
)
65+
else ()
66+
error("Unsupported board ${PICO_BOARD}" PICO_BOARD)
67+
endif ()
6068
endif ()
6169

6270

0 commit comments

Comments
 (0)