[CMake] Configuring different output file names for debug and release

Angel Riesgo ariesgo at geovirtual.com
Fri May 11 07:55:20 EDT 2007


Hi,

 

I am new to CMake, and I am having some problems trying to get the
projects generated by CMake to output the final binary files in the
format that I would like.

 

Basically, we are considering whether we should adopt CMake for our
project, and we are trying to get it to generate the Visual C++ projects
in accordance with our in-house conventions. We have a number of static
library projects whose output should go to a directory
"whatever/lib/win". The release versions should adhere to the name
format "xx.lib" whereas the debug versions should have the format
"xxD.lib". Note that we want both files to be in the same output
directory.

 

And this is where we are having problems. My first question is how I can
specify different output names for different configurations, so that the
debug output name has a "D" appended to the name.

 

My second question is how I can prevent CMake from adding "debug" and
"release" intermediate directories to the output path. In the
CMakeLists.txt file, I am setting LIBRARY_OUTPUT_PATH to a path ending
in lib/win/, but the Visual C++ project always has an extra $(OutDir)
appended to that. This means that the actual output directory ends up
being lib/win/debug or lib/win/release, which is not what we want.

 

I would really appreciate it if anyone can shed some light on this
issue.

 

A. J. Riesgo 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070511/effab555/attachment.htm


More information about the CMake mailing list