[CMake] Setting properties on all targets in one line

Alexander Neundorf a.neundorf-work at gmx.net
Thu May 31 15:27:53 EDT 2007


On Thursday 31 May 2007 14:29, Clinton Chau wrote:
> I want to build both x64 and Win32 binaries from the same source tree and
> the same CMakeLists.txt, merely by choosing the appropriate generator,
> Visual Studio 2005 or Visual Studio 2005 Win64, for example. I'd like all
> the build output binaries in the Win64 case, to be stored under a "Win64"
> or "x64" directory.
>
> I can achieve this by modifying the CMakeLists.txt in each project
> subdirectory and adding
>
> SET_TARGET_PROPERTIES(<TARGET> PROPERTIES PREFIX "Win64/")
>
>
>
> But I can't figure out a way of applying this prefix to all targets.

You can also set EXECUTABLE_OUTPUT_PATH , which applies to all 
executables "below" this point. Does this help ?

See also http://www.cmake.org/Wiki/CMake_Useful_Variables

Alex


More information about the CMake mailing list