CMake: Remove utility function dependency on mbed-os target

The utility function may be called by targets other than mbed-os
when it is broken into multiple libraries.
pull/13566/head
Hugues Kamba 2020-08-04 19:40:06 +01:00
parent dde395c82f
commit a1259ecf22
1 changed files with 1 additions and 2 deletions

View File

@ -4,8 +4,7 @@
# PREFIX - TARGET or similar (can be empty string)
# KEYWORD_LIST - list of labels that are used to include directories
function(mbed_add_cmake_directory_if_labels PREFIX)
get_target_property(target_labels mbed-os MBED_TARGET_LABELS)
foreach(key ${target_labels})
foreach(key ${MBED_TARGET_LABELS})
if(NOT "${PREFIX}" STREQUAL "")
string(PREPEND key ${PREFIX} "_")
endif()