[CMake] Runtime directory / staging question

Tyler Roscoe tyler at cryptio.net
Sat Dec 5 14:54:27 EST 2009


On Sat, Dec 05, 2009 at 01:38:40PM -0600, Brian Davis wrote:
> Can you provide an example of how you use this.  I would appreciate it.
> 
> I echoed these to the screen and they do not seem to be set.  Should I
> expect them to be?
> 
> PREFIX =
> 
> IMPORT_PREFIX =

PREFIX and IMPORT_PREFIX are properties, not variables. Use
set_target_properties() to manipulate them. Refer to the official
"PREFIX hack" as documented in the bug tracker for details.

hth,
tyler

> On Fri, Dec 4, 2009 at 10:31 AM, Tyler Roscoe <tyler at cryptio.net> wrote:
> 
> > On Fri, Dec 04, 2009 at 09:04:45AM -0600, Brian Davis wrote:
> > > What I would like to see is:
> > >
> > > PathToWherever/Debug/bin
> > > PathToWherever/Debug/lib
> > > PathToWherever/Debug/cfg
> > > ...
> > >
> > > PathToWherever/Release/bin
> > > PathToWherever/Release/lib
> > > PathToWherever/Release/cfg
> > > ...
> > >
> > > PathToWherever/Profile/bin
> > > PathToWherever/Profile/lib
> > > PathToWherever/Profile/cfg
> > > ...
> > >
> > > Is there a clean way to implement this.  I cannot figure out a way to use
> > > the PREFIX hack to get the above result as the ../ needs to be at then
> > end
> > > of the path and would merge debug, release, and profile builds into same
> > > dir.
> >
> > I use the PREFIX hack (as well as the IMPORT_PREFIX hack for import
> > libraries) combined with CMAKE_CFG_INTDIR to do what you want.
> >
> > tyler
> >
> 
> 
> 
> -- 
> Brian J. Davis


More information about the CMake mailing list