Using XCODE_SCHEME_ARGUMENTS with juce_add_plugin

Is there a way to specify which target(s) you would like to apply an XCODE_SCHEME_ARGUMENTS to? Using juce_add_plugin, when I open the Xcode project there are a lot of targets, one for each plugin type (Standalone, AU, VST3, AUv3, AAX) plus targets with suffixes like (_ALL, ALL_BUILD, _ZERO_CHECK and install). I’m still new to using CMake so I’m not sure what these are or how to omit them.

I think I figured it out so I’ll leave it here for future me and just in case I’m misunderstanding.

Let’s say you have your plugin that you’re defining in CMake as COOL_PLUGIN, so you’ve got
juce_add_plugin(COOL_PLUGIN... at the top of your CMakeLists.txt, which by default will generate targets for each plugin format plus CMake-related targets like ZERO_CHECK and ALL_BUILD.

In order to add scheme arguments, you have to start by turning on XCODE_GENERATE_SCHEME but by setting that property, only the specified schemes will be generated so something like set_target_properties(COOL_PLUGIN PROPERTIES XCODE_GENERATE_SCHEME ON) will make Xcode only generate a scheme for COOL_PLUGIN, which is the library target… not super useful for running in Xcode.

So instead, when specifying target names, use the actual Xcode targets that are generated. For example, if you’re trying to run the Standalone target in Xcode

set_target_properties(COOL_PLUGIN_Standalone PROPERTIES XCODE_SCHEME_ARGUMENTS "--testing-flag")

and/or you want to add an AUv3 option

set_target_properties(COOL_PLUGIN_AUv3 PROPERTIES XCODE_SCHEME_ARGUMENTS "--testing-flag")