What to do with _set_fancy?

Stephen Kelly steveire at gmail.com
Sat Sep 17 19:13:38 UTC 2011


Alexander Neundorf wrote:

> 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.

I don't know what SYSCONFIG is. Maybe it's not an important detail.

> 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.
> 

Is it a problem that kdesupport doesn't use set fancy? There's no guarantee 
that stuff in kdesupport has been installed into the same directories. Is 
that a problem that will be solved by this feature?

You wrote that it's a KDE only feature, but I'm still not sure I understand 
why. Is KDE alone in wanting to install things to consistent places?

>> > 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.

Ok. And in KDE4 times, that's not automatic, so eg, everything in kdesupport 
had to get a LIB_SUFFIX=64 in order to be correct?

I'm also confused because you said in the previous mail that it's not 
relevant to LIB_INSTALL_DIR. Or did I misunderstand?

When you talk about 'setting LIB_INSTALL_DIR manually', you don't mean a 
cache value or do you mean implicitly changing it by setting LIB_SUFFIX in 
the cache?

>> > 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, 

> 
> 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.

I'd be surprised if people don't already have a script that they use to set 
the right values. I have a bash function which does `cmake "$srcFolder" -
DCMAKE_INSTALL_PREFIX=$KDEDIR -DCMAKE_BUILD_TYPE=debug $@`.

I never actually type an install prefix.

But maybe I'm missing the point anyway. I haven't fully understood your 
emails I think.

I'd like to work on this though, so if you think there's a way forward to 
resolve this issue -- GNUInstallDirs.cmake or something else (can we make it 
generic/non kde specific so that it suits ECM?), let me know and I can do 
it.

Thanks,

Steve.




More information about the Kde-buildsystem mailing list