Interesting, I can repro with cmake 3.17.1 and Xcode 11.4. It seems that, when archiving, the static library is built into a DerivedData location instead of into the build tree, but the linker looks for it in the build tree. Not sure why that should be (possibly a CMake bug?). I’ll let you know if I find any more details.
Ahh thanks @reuk, the workaround solves it for now. But yes, you’re right, it seems it’s not a JUCE issue, but a CMake issue. Even if I create a pure CMake target with add_executable I have the same problem.