installing kdeinit modules (Re: KDE/kdebase)

Alexander Neundorf neundorf at kde.org
Thu Nov 8 18:31:56 CET 2007


On Thursday 08 November 2007, Andreas Pakulat wrote:
> On 08.11.07 16:22:03, David Faure wrote:
> > On Thursday 08 November 2007, Patrick Spendrin wrote:
> > > SVN commit 734310 by sengels:
> > >
> > > changing install locations of dll's to bin
> > >
> > >  M  +5 -1      apps/dolphin/src/CMakeLists.txt
> > >  M  +5 -1      apps/keditbookmarks/CMakeLists.txt
> > >  M  +5 -1      apps/kwrite/CMakeLists.txt
> > >  M  +5 -1      apps/lib/konq/CMakeLists.txt
> > >  M  +5 -1      runtime/kcmshell/CMakeLists.txt
> > >  M  +5 -1      runtime/kuiserver/CMakeLists.txt
> > >
> > >
> > > --- trunk/KDE/kdebase/apps/dolphin/src/CMakeLists.txt #734309:734310
> > > @@ -46,7 +46,11 @@
> > >
> > >
> > >  set_target_properties(dolphinprivate PROPERTIES VERSION 1.0.0
> > > SOVERSION 1 ) -install(TARGETS dolphinprivate  DESTINATION
> > > ${LIB_INSTALL_DIR} ) +install(TARGETS dolphinprivate
> > > +        RUNTIME DESTINATION ${BIN_INSTALL_DIR}
> > > +        LIBRARY DESTINATION ${LIB_INSTALL_DIR}
> > > +        ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
> > > +)
> >
> > This looks like a lot of duplicate code for nothing, we'll always get it
> > wrong when developing on linux and you'll always have to come and fix
> > things up......
> > Surely this can't be a solution.
> >
> > I have a feeling this has been discussed already, but really, this
> > solution is not a solution,
>
> Yes it has been discussed and no "real" solution was agreed on.

Maybe we could do something like this:

... LIB_INSTALL_DIR is lib here

if(WIN32)
   set(LIB_INSTALL_DIR "${LIB_INSTALL_DIR}" 
                     RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
                     LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
                     ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" )

endif(WIN32)

Then the usual syntax
install(TARGETS foo DESTINATION ${LIB_INSTALL_DIR})
will still work, it's just that LIB_INSTALL_DIR will be something different 
than you would expect under Windows (which IMO feels like a hack, but 
[maybe], so what).
And it relies on unspecified behaviour of the INSTALL() command (that you can 
use the generic destination and the specific ones together in one command and 
the specific ones will override the generic one).

Alex


More information about the Kde-buildsystem mailing list