Setting SwiftSetting using SPM build plugin

For the moment I only see the possibility to add source files to a target using the build tool plugins. Is it possible to also add build settings for the target on which the plugin is applied?

In the package manifest there is a place to define build settings for specific targets. I'm looking for a way to add a SwiftSetting to a target from within the plugin. Basically I need to do some checks on the resolved dependencies (which are available from within BuildToolPlugins PluginContext) and based on these checks I need to add a compilation condition SwiftSetting (which can then be used using the #if COMPILATION_CONDITION) from within the swift target.

Is this something that can be done using SPM BuildToolPlugins?