[CMake] Controling OutputDirectory in the vcprojs

Fernando Cacciola fernando.cacciola at gmail.com
Wed Dec 12 08:29:23 EST 2007


Hi,

I'm porting (or trying to) a custom build system to CMake.
Following Boost we generate .libs whose names reflect configurarion 
properties. To keep it simple, say we generate "foo_release.lib" and 
"foo_debug-lib".
I was able to get those names right by setting the <CONFIG>-OUTPUT-NAME 
target properties, but I still have a problem: I don't want them in 
"Release" and "Debug" folders (there is no need for that since the 
configuration is in the name).

Looking at "cmLocalVisualStudio7Generator.cxx" it seems I'm plain out of 
luck since "OutputDirectory" is forcibly defined as the configuration name, 
so

1) Can the VisualStudio generator be fixed to define that as 
LIBRARY_OUTPUT_DIRECTORY if defined?

2) What can I do now? Can I plug in a post build event to copy the generated 
.lib to the right folder? Or do I need to handle it as an install rule? (and 
force my users to do "make install" in the end even for in-source builds)

TIA

-- 
Fernando Cacciola
SciSoft
http://fcacciola.50webs.com 




More information about the CMake mailing list