Hi all, hopefully someone can offer a suggestion.
I am trying to build my plugin so that it links statically against the C++ runtime library on Windows (dont want users to have to get vc runtimes). I am using Cmake, and I have added this to my CMakeFile (from an example on the cmake website):
set_property(TARGET myplugin PROPERTY
When I generate my VS projects, it looks like the project file for myplugin has the correct code generation setting (eg /MTd for multi threaded static debug) but the client project (eg the VST3 project) has the dynamic runtime set (eg /MDd = multi threaded dynamic debug)
Does anyone know if this is an issue, or is there another juce related flag I need to set?
Another user helped me out. In case anyone else runs into it:
Different targets are created for each client, so in my case I added:
set_property(TARGET myplugin_VST3 PROPERTY
I’ve found a more ‘global’ solution to this problem:
Bump the minimum CMake version:
Use this at the top of the cmake file (no need to configure per target)
You can do that as well FWIW
add_compile_options($<$<CONFIG:Release>:/MT> # Runtime library: Multi-threaded
$<$<CONFIG:RelWithDebInfo>:/MT> # Runtime library: Multi-threaded
$<$<CONFIG:Debug>:/MTd> # Runtime library: Multi-threaded Debug
Thanks for the additional tips.