CMake: Icon file for MacOS not being added to target correctly

I’m building on JUCE 6.0.8, Xcode 12.4, CMake 3.20.3.

When I use ICON_BIG and/or ICON_SMALL, the Icon.icns gets generated correctly, however the icon is not being attached to the target correctly somehow. I can reproduce this by updating the CMake/AudioPlugin example with a valid PNG in the call to juce_add_plugin

When the Standalone application launches it has no icon in the dock.

It seems that it is not finding the file in the Info.plist for some reason, and perhaps is not in the Resources folder correctly? Any ideas here?

I just tried adding an ICON_BIG to the AudioPluginExample and then generating an Xcode project using CMake 3.20.2. It worked when building from the commandline.

If Xcode was open when you added the ICON_ arguments, perhaps it failed to refresh the project when CMake was re-run. Have you tried completely quitting Xcode and reopening the project? Also, have you tried inspecting the built artefact in the Finder to see whether it is displayed with an icon there?

Hi @reuk Thanks for the feedback. I was banging my head on this all yesterday. Now I’ve deleted the whole cmake build folder, reconfigured and built. The target in Xcode does not show the icon, but the app is built correctly with an icon, so that seems fine.

Looks like your hunch was correct - my mistake.