CMAKE plugin and OS 11 Universal Binary

We want to build our first Universal Binary 2 for OS 11 ARM. We are using the new JCUE 6 CMAKE infrastructure and i started to think how we can build the plugins as Universal Binary without time consuming manual steps.

There are some problems i see:

  • The deployment target may has to be different for the ARM and Intel builds.
  • We may can’t build the AAX plugin because the library does not compile for ARM and is not supported?
  • Other problems that may occur?

Can this be configured within the CMAKE file and does juce already offer a way to build universal binaries 2 with CMAKE where we can keep our low deployment targets for the intel builds and also don’t have to care about AAX (maybe it can be excluded for this architecture as long as it’s not supported)?

Any help welcome!

I’ve successfully built universal JUCE targets by configuring the CMake project with

cmake -D CMAKE_OSX_ARCHITECTURES="arm64;x86_64"

To disable arm builds for specific targets, you should be able to use the OSX_ARCHITECTURES property:

set_target_properties(my_plugin_AAX PROPERTIES OSX_ARCHITECTURES x86_64)

Thanks for the fast answer. That looks pretty easy. I will try it asap. For the moment it looks like it was a good decision to switch to CMAKE builds :slight_smile: