Generator expressions with spaces must be quoted (see this article for more on that). However, in this case, you shouldn’t be using spaces. You should be passing a list, and the COMMAND_EXPAND_LISTS will then ensure the arguments are expanded correctly on the command line.
Using intermediate variables to hold the condition and command will make this much clearer:
set(have_runtime_dlls
$<BOOL:$<TARGET_RUNTIME_DLLS:${t}>>
)
# This stores the command as a list
set(command
${CMAKE_COMMAND} -E copy
$<TARGET_RUNTIME_DLLS:${t}>
$<TARGET_FILE_DIR:${t}>
)
add_custom_command(TARGET ${t} POST_BUILD
COMMAND "$<${have_runtime_dlls}:${command}>"
COMMAND_EXPAND_LISTS
)