[CMake] Specifying target details - a question

Dekeyser, Kris Kris.Dekeyser at lms.be
Mon Oct 18 04:08:39 EDT 2004


You can set the output directory with EXECUTABLE_OUTPUT_PATH and
LIBRARY_OUTPUT_PATH. For VS 6, the extra Debug, Release etc subdir is added
by the project templates. You can modify these and then regenerate your
projects. For example in <CMAKE_root>/Templates/DLLHeader.dsptemplate, you
can remove 'Release', 'Debug', etc. from 'Output_Dir' and 'Intermediate_Dir'
in their respective sections. Note that both variables are defined twice,
once as PROP BASE and once as PROP. You probably only need to change the
last one, but I always do both, just to be sure. In the Debug section there
is additional Debug string to be removed in the last line (ADD LINK32).
There you should remove the 'Debug' string and the '/' after it.

However, I think it is not a good idea to mix the files as you may end up
linking some release object files with debug object files. This may very
well give the strangest results, errors and crashes on the Windows platform.
If you do not keep the debug and release objects in separate dirs, you
should consider creating a single build type configuration. There is an
entry in the FAQ describing the procedure.

BTW: are you performing an in-source build or out-of-source build?

- Kris

> -----Original Message-----
> From: pnewman [mailto:pmnewman at tiscali.co.uk]
> Sent: Saturday, October 16, 2004 16:13
> To: cmake at www.cmake.org
> Subject: [CMake] Specifying target details - a question
> 
> 
> 
> Dear CMaker's
> 
> Brief problem description. I have a project which consists of multiple
> executables and libraries. Currently I maintain VC6.7 and 
> unix make files -
> this is a pain and clearly CMake is the future. For various 
> reasons the
> shape of the directory structure needs to remain the same 
> (regardless of
> whether or not the structure is a good plan) after the 
> introduction of the
> CMake build system  - this is where I am hitting problems. 
> The cut down
> simplified structure looks like this (project is called MOOS)
> 
> -MOOS
>   - MOOSLIB
>   - AnApplication
>   - MOOSBin
> 
> I want to the library built from the source in MOOSLib to be placed in
> MOOSBin. I then want to build "AnApplication" and again, place the
> executable in MOOSBin. I don't want XXX/debug/MOOSLib etc - simply
> MOOS/MOOBin/lMOOS.lib etc. The question then is how do I 
> specify exactly
> where I want targets to be placed (relative to the project 
> root) and exactly
> what their name should be? I apologise if this is a dumb 
> question but help
> would be greatly appreciated....
> 
> very best
> 
> PMN
> 
> ------------------------------------
> Dr Paul Newman
> Oxford Robotics Research Group
> Oxford University
> email pnewman at robots.ox.ac.uk
> tel : (+44) 01865 283148
> Fax : (+44) 01865 80922
> 07786 261325 (mobile)
> 
> http://www.robots.ox.ac.uk/~pnewman
> ------------------------------------
> 
> 
> 
> _______________________________________________
> CMake mailing list
> CMake at www.cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
> 
+-+-+- Email Confidentiality Footer +-+-+- 
Privileged/Confidential Information may be contained in this message. If you
are not the addressee indicated in this message (or responsible for delivery
of the message to such person), you may not print, retain, copy nor
disseminate this message or any part of it to anyone and you should notify
the sender by reply email and destroy this message. Neglecting this clause
could be a breach of confidence. Please advise immediately if you or your
employer does not consent to Internet email for messages of this kind.
Opinions, conclusions and other information in this message that are not
related to the official business of my firm shall be understood as neither
given nor endorsed by it.



More information about the CMake mailing list