MrHoffman wrote:
Also: https://theevilbit.github.io/posts/macos_persistence_spotlight_importers/ (an intro to the same importer stuff, but for different purposes than verification)
That's just the client API for spotlight. I'm working on one right now for my app. The idea is that if someone tries to do a Spotlight search for some developer name listed in the new Ventura "background apps" settings, it will return a document where I've printed out that developer name. Then they can cross-reference the name and see exactly what file they need to look at. Otherwise, those developer names never occur anywhere on the system. My app extracts those using the low-level security API and stores it in a document. The Spotlight importer reads the document (which is just a gzipped XML file), finds the developer names, and sends them to Spotlight to be indexed.
The key part, as far as the OP is concerned, is that part where it reads the document for information to add to Spotlight. In my case, I designed the document so I know how to parse it. It's the same with Apple. But Apple is a big company. The team that wrote the Spotlight importer for apps is different than the team that executes apps. They have a much more narrow concept of what constitutes an "app". But their implementation is not documented anywhere.
The OP could compare a valid, "hello world" app generated with both cmake and Xcode, learn cmake internals, and submit a patch, and probably in the process learn whatever magic cmake setting was missing. Then again, an easier option might be to just use Xcode. As added benefit, the Xcode app isn't going to break on the next OS version update.