cmake install_files target has changed behavior in a dangerous way.

Alexander Neundorf alexander.neundorf at gmx.net
Tue Jul 4 19:21:47 BST 2006


Am Dienstag 04 Juli 2006 20:01 schrieb Thomas Zander:
> After some talk on IRC Laurant and me seem to not be able to get over a
> difference in opinion about one thing; and I want to put the issue to a
> wider audience to get more input.
>
> In cmake files last week you can see targets like these:
>   install_files( /include FILES foo.h)
> This has to change to
>   install(FILES foo.h DESTINATION include)
> so far so good.
>
> The problem comes when you used /include (including that slash) in the new
> version. As the install target defaults to absolute paths. So I really do
> install to /include    Not to $prefix/include
> This changes the concept of "install everything in $prefix"
> to "install everything anywhere in the system; you are responsible for
> keeping the prefix".

...
> I disagree; taking away the basic concept of everything is in the prefix
> makes things fragile and a check in koffice/libs shows that in some 30
> cases other authors agreed with my assumption.

Yes, we are right now in the process of adapting everything.

> How do others feel about this?  Should the buildfile writers be more
> knowledgable, or should damaging your system be hard ?

Come on.
We _must_ be able to install things outside of CMAKE_INSTALL_PREFIX, and now 
we are.
If you use an absolute path, it will be installed to the absolute path. If you 
want it to be relative to CMAKE_INSTALL_PREFIX, use a relative path.

Bye
Alex




More information about the kde-core-devel mailing list