Hi Nils,

Great! Could you please give me some mininal example and perhaps add
it to documentation page which is now kind of vague? From what is
written there, I suppose that this variable changes the runtime output
directory, but for all targets since it's set and until it's changed?

eg. if I have huge CMakeLists.txt file that includes other CMake files
using add_subdirectory I would wrap all add_subdirectory directives
with change to this variable? like:

RUNTIME_OUTPUT_DIRECTORY("extensions/")
add_subdirectory("extension/ext1")
# Now I should reset it back to what it was?
RUNTIME_OUTPUT_DIRECTORY("WHAT DO I PUT HERE??")

On Mon, Mar 30, 2015 at 3:31 PM, Nils Gladitz <[email protected]> wrote:
> On 03/30/2015 03:25 PM, Petr Bena wrote:
>>
>> 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?
>>
>
> You could set CMAKE_RUNTIME_OUTPUT_DIRECTORY [1] (before you create your
> targets).
>
> Nils
>
> [1]
> http://www.cmake.org/cmake/help/v3.2/variable/CMAKE_RUNTIME_OUTPUT_DIRECTORY.html
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to