I’m sorry, I realize that I’ve done a lousy job of explaining my issue – It is difficult for me to grasp it myself, let alone putting it into words…
I have a CMake config consisting of a top level CMakeLists.txt (+ some included files) and a CMakePresets.json to set up some different configs.
I have presets for ‘desktop’ (macOS with Xcode generator), ‘windows-debug’ (Ninja build for Windows, Debug config) and ‘windows-release’ (Ninja build for Windows, Release config).
All the presets create “out-of source build directories”, i e build directories that are parallel to the project directory, just to keep “temporary” files separate from my project tree, so “../build-desktop”, “../build-windows-release” etc.
Configuring the build using the preset works just fine, the build directory is created, the Xcode project is generated there and so on. And when I build in Xcode things work mostly fine – The shared code and plugins all compile, are signed etc. The only thing that suddenly started failing was that the VST3 post build script could no longer run juce_vst3_helper (with “command not found”), although it has already done so successfully hundreds of times overl the last week or so.
I still haven’t been able to figure out what caused this or how to make it work again, so at the end my decision was to take juce_vst3_helper out of the equation entirely and replace it with my own CMake-based alternative.
I haven’t made any big recent changes to my CMakeLists.txt, I just changed macOS deployment target in the preset. And changing it back didn’t fix things, so it wasn’t the actual cause of the issue.
So I think I introduced the problem much earlier, but hadn’t noticed since I hadn’t deleted the build directory in a long time, so when I finally did it I probably deleted something that was needed but will no longer be created under my setup. It could even have happened before I put my CMake stuff under version control, because going back to earlier commits doesn’t seem to fix the issue either. But I’m kind of lost since I’m still very unfamiliar with CMake, so I’m just speculating now. 
Anyway, I just wanted to ask here in case it was a well-known issue, but apparently not, so I have must have done something really weird.
I might try creating a new minimal plugin project to see if I can reproduce the issue in a more controlled environment.