Generator expressions should be supported by add_dependencies()
add_custom_target(Foo)
add_custom_target(Bar)
add_dependencies(Bar $<$<CONFIG:RELEASE>:Foo>)
should work, but currently gives an error
The dependency target "$<$<CONFIG:RELEASE>:Foo>" of target
"Bar" does not exist.