On 05/28/2011 12:33 PM, Thomas Roß wrote:
> set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin CACHE PATH "" )
> to have all my executables in one place

This doesn't need to be in the cache.  You can just set() it in the top level.

> used set_target_properties( plugin PROPERTIES OUTPUT_NAME "plugins/plugin" )
> on the plugin target to get it created in the needed subdirectory.

The OUTPUT_NAME property does not support slashes.  It worked only by accident
in other generators.

The proper way to do this is to set the RUNTIME_OUTPUT_DIRECTORY on the target.
The documentation of the CMAKE_RUNTIME_OUTPUT_DIRECTORY:

  
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_RUNTIME_OUTPUT_DIRECTORY

says just

  "used to initialize the RUNTIME_OUTPUT_DIRECTORY property on all the targets"

By setting the variable at the top you set the default used for all targets.
You can still change it for a specific target:

  set_property(TARGET plugin PROPERTY
    RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/plugins")

-Brad
_______________________________________________
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to