howto install rules ?

Alexander Neundorf neundorf at kde.org
Fri Jan 13 17:33:30 CET 2006


Hi,

On Thursday 12 January 2006 23:53, David Faure wrote:
> On Thursday 12 January 2006 23:00, Alexander Neundorf wrote:
> > Hi,
> >
> > with cmake install rules usually look this way:
> >
> > 1) INSTALL_FILES( /share/applications/kde FILES kpager.desktop )
> > The path is relative to the installation prefix.
> > Is it necessary to use a variable for this path ?
>
> Yes, see ./configure --datadir=...

One note how such things are set with cmake.
cmake doesn't recognize parameters like --prefix or --datadir in this syntax.
There are two ways how it is done with cmake:
cmake -DCMAKE_INSTALL_PREFIX=/opt/kde4 (works for every cmake variable)
or via the cmake GUI, where all options can be set. Currently for unix there 
is a ncurses-based GUI.
There have already been discussion about adding support for 
--prefix=<some_dir> to cmake on the cmake mailing list, and the cmake guys 
didn't dismiss this idea completely.

> It is known that some distributions install things with another hierarchy
> than the default; at least debian used to do it for a long time, don't know
> if that's still the case.
>
> > 2) This would look like this:
> > INSTALL_FILES( ${KDE4_APP_DIR} FILES kpager.desktop )
>
> Looks ok to me. Why KDE4 and not just KDE?

To be able to see whether this is for KDE4 or KDE3 and not to mix things up. 
There is a FindKDE3.cmake together with a KDE3Macros.cmake, containing stuff 
for KDE3, and there will be a FindKDE4.cmake together with a 
KDE4Macros.cmake. IMO they should not use the same names for stuff which has 
a different meaning. If they have different names, it should e.g. also be 
possible to build applications for KDE3 and KDE4 in one project.

Bye
Alex
-- 
Work: alexander.neundorf at jenoptik.com - http://www.jenoptik-los.de
Home: neundorf at kde.org                - http://www.kde.org
      alex at neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list