A similar question was asked a few months ago, where I advised using target properties , and also refers to another answer . For MSVC, you can fully specify the location of executable files, libraries, archives, etc. For each configuration.
eg. using something like:
if ( MSVC ) set_target_properties( ${targetname} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${youroutputdirectory} ) set_target_properties( ${targetname} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_DEBUG ${youroutputdirectory} ) set_target_properties( ${targetname} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELEASE ${youroutputdirectory} )
which will put all your libraries in a single output directory $ {youroutputdirectory}, regardless of whether it is in the Debug or Release configuration.
Andrรฉ Jan 15 '12 at 15:25 2012-01-15 15:25
source share