StandalonePluginHolder App in Cmake and OSX microphone permissions

I’m having a lot of difficulty getting microphone permissions on OSX enabled in my StandalonePluginHolder app after swapping the Projucer project to a Cmake one.

I’d like a very basic Cmake Juce project that brings up the microphone permissions prompt and enables microphone input to my app.

I’m happy to help with this if it doesn’t exist already.

The simplest way to get a working CMakeLists.txt from a .jucer file is to ask Grok to convert it for you. If you’ve got things set up how you need them in Projucer, Grok does a pretty good job of translating this to CMakeLists.txt configuration. Simply paste your .jucer into Grok and tell it to translate it to CMake for you. I’ve done this multiple times in the last few months and have had no issues with the resulting file, which just works for me most of the time (including with permissions/etc.)

I copied the following from a JUCE forum post and it worked well:

MICROPHONE_PERMISSION_ENABLED TRUE
MICROPHONE_PERMISSION_TEXT "${PRODUCT_NAME} Standalone needs access to your audio interface"
HARDENED_RUNTIME_ENABLED TRUE
HARDENED_RUNTIME_OPTIONS com.apple.security.device.audio-input

The whole cmake file is quite complex, but in case you need a reference: ZLEqualizer/CMakeLists.txt at main · ZL-Audio/ZLEqualizer · GitHub