File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,14 @@ add_subdirectory(cmsis/device/rtos EXCLUDE_FROM_ALL)
128
128
# preventing CMake from working its usage requirements magic and forcing us to set the linker
129
129
# script globally.
130
130
#
131
+ # keep cmake naming convention in targets, using lowercase with dashes
132
+ string (TOLOWER ${MBED_TARGET} MBED_TARGET_CONVERTED )
133
+ string (REPLACE "_" "-" MBED_TARGET_CONVERTED ${MBED_TARGET_CONVERTED} )
134
+ string (PREPEND MBED_TARGET_CONVERTED "mbed-" )
135
+
131
136
# TODO: Remove when all MBED_TARGETS have been converted to build system targets.
132
- if (TARGET ${MBED_TARGET } )
133
- target_link_libraries (mbed-core INTERFACE ${MBED_TARGET } )
137
+ if (TARGET ${MBED_TARGET_CONVERTED } )
138
+ target_link_libraries (mbed-core INTERFACE ${MBED_TARGET_CONVERTED } )
134
139
else ()
135
140
get_property (LINKER_SCRIPT GLOBAL PROPERTY MBED_TARGET_LINKER_FILE )
136
141
mbed_set_linker_script (mbed-core ${LINKER_SCRIPT} )
You can’t perform that action at this time.
0 commit comments