diff --git a/cmake/util.cmake b/cmake/util.cmake index a6118f0e34..ff954b7a4e 100644 --- a/cmake/util.cmake +++ b/cmake/util.cmake @@ -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()