CMake iOS AUv3 PLIST_TO_MERGE problem

Latest developer branch. I try to generate a XCode iOS project with a standalone and a AUv3. I need to merge a plist. I do following:

juce_add_plugin(AudioPlugin 
....
PLIST_TO_MERGE "${CMAKE_CURRENT_SOURCE_DIR}/plist_ios.plist"
....

The file looks like this (same worked in projucer):

<plist version="1.0">
<dict>
	    <key>UTExportedTypeDeclarations</key>
    <array>
      <dict>
        <key>UTTypeConformsTo</key>
        <array>
          <string>public.data</string>
        </array>
        <key>UTTypeDescription</key>
        <string>TAL-U-NO-LX Preset File</string>
        <key>UTTypeIdentifier</key>
        <string>ch.toguaudioline.talunolxv2</string>
        <key>UTTypeTagSpecification</key>
        <dict>
          <key>public.filename-extension</key>
          <string>pjunoxl</string>
          <key>public.mime-type</key>
          <string>application/octet-stream</string>
        </dict>
      </dict>
      <dict>
        <key>UTTypeConformsTo</key>
        <array>
          <string>public.data</string>
        </array>
        <key>UTTypeDescription</key>
        <string>Scala tuning file</string>
        <key>UTTypeIdentifier</key>
        <string>ch.toguaudioline.talunolxv2.tun</string>
        <key>UTTypeTagSpecification</key>
        <dict>
          <key>public.filename-extension</key>
          <string>tun</string>
          <key>public.mime-type</key>
          <string>application/octet-stream</string>
        </dict>
      </dict>
    </array>
</dict>
</plist>

Also tried a relative path. CLion seems to find the file in the path. But if it didn’t merge anything if i look at the AUv3’s plist file in XCode. Any help welcome.

Like in Projucer, PLIST_TO_MERGE is not a file, but some plist content.

If you want to keep it in an external file, you can do something like:

file(READ "${CMAKE_CURRENT_SOURCE_DIR}/plist_ios.plist" plist_content_to_merge)

juce_add_plugin(AudioPlugin 
....
PLIST_TO_MERGE "${plist_content_to_merge}"
....

I hope this helps!

2 Likes

Thanks a lot. This worked :slight_smile: