CMAKE ISSUE - CUSTOM_XCASSETS_FOLDER & ICON_BIG/ICON_SMALL incompatibility

I noticed an unexpected behavior within juce cmake utils. If the icon big or small is not set then there is no way to set the xcassets since the code returns.

   function(_juce_generate_icon source_target dest_target)
        get_target_property(juce_library_code ${source_target} JUCE_GENERATED_SOURCES_DIRECTORY)
        get_target_property(juce_property_icon_big ${source_target} JUCE_ICON_BIG)
        get_target_property(juce_property_icon_small ${source_target} JUCE_ICON_SMALL)

        if(NOT (juce_property_icon_big OR juce_property_icon_small))
            return()
        endif()

In the documentation it is said that icons are not used when the CUSTOM_XCASSETS_FOLDER is set, so it would make sense to remove that return code above since we don’t necessary want to set the ICON_BIG or ICON_SMALL.

CUSTOM_XCASSETS_FOLDER

    A path to an xcassets directory, containing icons and/or launch images for this target. If this is specified, the ICON_BIG and ICON_SMALL arguments will not have an effect on iOS, and a launch storyboard will not be used.

Thanks for reporting, hopefully this will resolve the issue:

1 Like

It resolved the issue, thank you!