[CMake] Reliable binaries output directory

Nils Gladitz nilsgladitz at gmail.com
Fri Mar 7 15:06:22 EST 2014


On 07.03.2014 18:55, Lucas Soltic wrote:
> Is there a way to know exactly (through a CMake variable or command) where the binaries will be put?

In which context do you need the location?

If you need the path for e.g. a custom command[1] a generator 
expression[2] like $<TARGET_FILE_DIR:tgt> or $<TARGET_FILE:tgt> might be 
what you are looking for.

Nils

[1] 
http://www.cmake.org/cmake/help/git-master/command/add_custom_command.html
[2] 
http://www.cmake.org/cmake/help/git-master/manual/cmake-generator-expressions.7.html


More information about the CMake mailing list