[CMake] Change the default output path in Visual Studio

Petr Bena benapetr at gmail.com
Fri Apr 10 03:51:24 EDT 2015


Yep

This works

On Fri, Apr 10, 2015 at 9:33 AM, Nils Gladitz <nilsgladitz at gmail.com> wrote:
> On 04/10/2015 09:20 AM, Petr Bena wrote:
>>
>> I got to test it now, it doesn't seem to work, it changes the path,
>> but instead of ROOT/Debug/extensions/library_here.dll it puts it to
>> ROOT/extensions/Debug/library_here.dll which is different, but still
>> not what I wanted.
>
>
> For multi-configuration generators (like Visual Studio) the configuration
> specific sub-directory is appended since the output of all configurations
> can not occupy the same space at the same time.
>
> You can set the CMAKE_RUNTIME_OUTPUT_DIRECTORY_<CONFIG> [1] variables
> instead (one variable per configuration) which does not append any such
> directory.
>
> You should be able to point all of those variables at the same directory at
> your own risk.
>
> Nils
>
> [1]
> http://www.cmake.org/cmake/help/v3.2/prop_tgt/RUNTIME_OUTPUT_DIRECTORY_CONFIG.html


More information about the CMake mailing list