Add tools generated definitions and properties

pull/13566/head
Robert Walton 2020-07-28 14:11:34 +01:00 committed by Hugues Kamba
parent 0e1770daf5
commit 335dfddec1
2 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,10 @@ include(${MBED_ROOT}/cmake/profile.cmake)
include(${MBED_ROOT}/cmake/env.cmake)
include(${MBED_ROOT}/cmake/util.cmake)
set_target_properties(mbed-os PROPERTIES MBED_TARGET_LABELS "${MBED_TARGET_LABELS}")
target_compile_definitions(mbed-os PUBLIC ${MBED_TARGET_DEFINITIONS})
target_compile_definitions(mbed-os PUBLIC ${MBED_CONFIG_DEFINITIONS})
# Specify a default build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo"

View File

@ -4,7 +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_property(target_labels GLOBAL PROPERTY MBED_TARGET_LABELS)
get_target_property(target_labels mbed-os MBED_TARGET_LABELS)
foreach(key ${target_labels})
if(NOT "${PREFIX}" STREQUAL "")
string(PREPEND key ${PREFIX} "_")