[CMake] Change the default output path in Visual Studio

Petr Bena benapetr at gmail.com
Mon Mar 30 09:25:48 EDT 2015


I have following problem:

I got a project with plugins, each plugin and core is a separate cmake
project, however core includes all of them

When I configure "core" it also configures all plugins and running
"make" also make core, all libraries and plugins.

My problem however is the default location of these plugins in Visual
Studio, the default folder layout is:

CORE/Release/program.exe
CORE/extensions/ext1/Release/extension1.dll
CORE/extensions/ext2/Release/extension_bla.dll

What I need is:

CORE/Release/program.exe
CORE/Release/extensions/extension1.dll
CORE/Release/extensions/extension_bla.dll

I can do this by right clicking every single extension -> project
config -> output path in Visual Studio. But everytime I rerun cmake
which generates solution files I have to do that again and it's quite
annoying, is there a way to make the default output path different?


More information about the CMake mailing list