What to do with _set_fancy?

Alexander Neundorf neundorf at kde.org
Sat Sep 17 03:34:21 UTC 2011


On Friday, September 16, 2011 04:56:35 PM Stephen Kelly wrote:
> Alexander Neundorf wrote:
> > On Tuesday, September 13, 2011 08:27:27 PM Stephen Kelly wrote:
> >> Hi,
> >> 
> >> FindKDE4Internal has a macro _set_fancy which does some messing about
> >> with the cmake cache and variables one might set (particularly paths).
> >> 
> >> * Where does this feature belong?
> > 
> > It is very special.
> > For some of the install destinations, it shouldn't be necessary at all.
> > E.g. for the LIB_INSTALL_DIR and for INCLUDE_INSTALL_DIR, these two don't
> > even have to be in the cache, so a simple set should do for them (as
> > discussed in Randa). This has the positive effect that it is much easier
> > to find the include and lib directory from a Config.cmake file.
> > 
> > For some, it needs to be in the cache, e.g. the /etc-dir, SYSCONFIG I
> > think.
> > 
> > Additionally, it has the additional logic, that if kdelibs has already
> > been
> > installed to the current  CMAKE_INSTALL_PREFIX, then it reuses all the
> > install dirs from that kdelibs installation.
> > This was a special request from some of our developers.
> 
> Does this mean anything in the context of frameworks? If we consider that

I think so.
This feature is mostly a convenience thing, but potentially useful for any 
project which installs files into more than one directory.
Then this feature makes sure that e.g. all SYSCONFIG files go into the same 
install directory, without making it necessary to manually adjust the 
SYSCONFIG install dir for each of the installed packages manually to the same 
dir.
And this must be "before" any framework is installed, otherwise it is not 
guaranteed that all already installed frameworks have been installed into the 
same directories, which is the goal of this feature.

> > Since 2.8.4 or 2.8.5 cmake comes with a GNUInstallDirs.cmake, which
> > defines a set of install locations as cache variables.
> > Maybe we should use that instead ?
> 
> I'm not sure. I read the documentation and I can't tell if it would make
> the patch I added to kauth obsolete. Can you review the patch
> (ba1ed1db5ecd97db70eb820233e01498303d7af5) and find out?
> 
> I also don't know why kauth uses the macro. When should the macro be used?

Whenever you want that for some install directory the same directory is used 
as has been used for kdelibs (in the case that you install into the same 
prefix as kdelibs).
E.g. if for kdelibs LIB_INSTALL_DIR has  been manually set to lib64, all other 
KDE libraries will be installed into lib64.

So, for packagers it is probably not really necessary, since they have to 
script it anyway, for everybody else the defaults should do.
When having to set the directories manually to the same values, this will lead 
to problems, since people will not always remember.

Alex


More information about the Kde-buildsystem mailing list