JUCE6 + CMake + Visual Studio 2015

i’m currently trying to port a Projucer plugin project to CMake and am running into some troubles.
When I try to open the exported CMake-Project with VS2015 it reports an error that a project with the same name is already in the solution.
When using it with VS2019 it is working fine, the problem seems to be a folder which contains the VST3, VST, … projects, which has the same name as the “Shared_Code” project.
I’ve managed to work around this problem by removing the folder of the plugin-targets like this:

set_target_properties(<pluginname>_VST3 PROPERTIES FOLDER "")

Maybe it would be better to handle this on the juce side itself?
Best, Stephan

Thanks for raising this. I’ve pushed a change which fixes the issue in the JUCE project when generating VS2015 projects with JUCE_BUILD_EXAMPLES=ON. Hopefully this fixes the issue in your project too. Let me know if it still doesn’t work for you and I’ll take another look.

1 Like

Nice! Yes that resolves the issue, thanks!
Another question: I’ve noticed that when compiling a plugin including the AAX format, the project doesn’t generate the aax-bundle, but only compiles the actual binary. Is there any cmake function for doing that, or do i need to create the bundle myself?

That’s strange, the bundle should be generated automatically. If you enabled AAX on an existing build tree, it’s possible that the bundle structure may not have been generated correctly. As a sanity check, you could try removing your CMake build folder completely and re-generating it.

I did, with no success. I played around a bit with the LIBRARY_OUTPUT_DIRECTORY property of the targets, our CI expects the binaries to be placed in <root>/bin/<config>/<arch>/<format>/, e.g. <root>/bin/Release/x64/VST3/foobar.vst3. So I’ve set this folder as LIBRARY_, ARCHIVE_ and RUNTIME_OUTPUT_DIRECTORY, just to be sure and this works fine for vst3 and vst2.
But i guess that maybe there is some postbuild-script that creates the aax-bundle, so i’m not entirely sure if thats the correct way of doing things? :slight_smile:

CMake doesn’t natively understand the bundle formats for VST3 and AAX plugins on Windows, so the JUCE/CMake compatibility layer has to do a bit of extra work to create the correct folder structure. Unfortunately, the OUTPUT_DIRECTORY properties will apply to the compilation output itself, rather than the entire bundle.

If you remove the custom OUTPUT_DIRECTORY properties, is the bundle created properly in plugin_artefacts/config/AAX?

If so, you may need to write a custom POST_BUILD step to copy the plugin bundle into the correct directory.

You are right, if i dont modify the output directory the bundle is created correctly. I’ve seen that JUCE uses a script to create the bundle, i guess i’ll just call the script with the new location post-build. Thanks for your help, and great work on making JUCE CMake-compatible, its a pleasure to work with it!
Best, Stephan