# JUCE6 + CMake + Visual Studio 2015

**URL:** <https://forum.juce.com/t/juce6-cmake-visual-studio-2015/42008>\
**Category:** General JUCE discussion\
**Created:** [October 2, 2020, 11:09am UTC](https://forum.juce.com/t/juce6-cmake-visual-studio-2015/42008 "2020-10-02T11:09:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vallant](https://avatars.discourse-cdn.com/v4/letter/v/c57346/32.png) [@vallant](https://forum.juce.com/u/vallant)\
**Post date:** [October 2, 2020, 11:09am UTC](https://forum.juce.com/t/juce6-cmake-visual-studio-2015/42008/1 "2020-10-02T11:09:09Z")

</div>

Hi,  
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

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [October 2, 2020, 5:24pm UTC](https://forum.juce.com/t/juce6-cmake-visual-studio-2015/42008/2 "2020-10-02T17:24:59Z")

</div>

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.

> <https://github.com/juce-framework/JUCE/commit/857ee66b3955ff9925f50a9094841a0bff55a550>

---

<div class="post-metadata">

**Author:** ![vallant](https://avatars.discourse-cdn.com/v4/letter/v/c57346/32.png) [@vallant](https://forum.juce.com/u/vallant)\
**Post date:** [October 5, 2020, 3:53pm UTC](https://forum.juce.com/t/juce6-cmake-visual-studio-2015/42008/3 "2020-10-05T15:53:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [October 5, 2020, 3:59pm UTC](https://forum.juce.com/t/juce6-cmake-visual-studio-2015/42008/4 "2020-10-05T15:59:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vallant](https://avatars.discourse-cdn.com/v4/letter/v/c57346/32.png) [@vallant](https://forum.juce.com/u/vallant)\
**Post date:** [October 5, 2020, 5:37pm UTC](https://forum.juce.com/t/juce6-cmake-visual-studio-2015/42008/5 "2020-10-05T17:37:17Z")

</div>

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? 🙂

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [October 5, 2020, 6:12pm UTC](https://forum.juce.com/t/juce6-cmake-visual-studio-2015/42008/6 "2020-10-05T18:12:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vallant](https://avatars.discourse-cdn.com/v4/letter/v/c57346/32.png) [@vallant](https://forum.juce.com/u/vallant)\
**Post date:** [October 6, 2020, 9:36am UTC](https://forum.juce.com/t/juce6-cmake-visual-studio-2015/42008/7 "2020-10-06T09:36:08Z")

</div>

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
