Getting rid of the LIB_INSTALL_DIR hack on windows

Alexander Neundorf neundorf at kde.org
Tue Jan 15 00:55:40 CET 2008


On Saturday 12 January 2008, Ralf Habacker wrote:
> Michael Pyne schrieb:
> > On Saturday 12 January 2008, Christian Ehrlicher wrote:
> >> Hi,
> >>
> >> I know we discussed this already, but I'm very unhappy with the current
> >> solution.
> >> The problem is (for all who don't remember) that we want to install the
> >> shared libs into /bin on windows. When we install the shared libs into
> >> /lib, we've to add an entry to the PATH env variable. Also it's not the
> >> normal way to install shared libs in another location than the
> >> executable - it would just confuse the user.
> >>
> >> Because of this a hack for LIB_INSTALL_DIR was added:
> >> set(LIB_INSTALL_DIR      "lib${LIB_SUFFIX}"
> >>                     RUNTIME DESTINATION "bin"
> >>                     LIBRARY DESTINATION "lib${LIB_SUFFIX}"
> >>                     ARCHIVE DESTINATION "lib${LIB_SUFFIX}"  )
> >>
> >> This works fine until someone uses LIB_INSTALL_DIR in another context -
> >> e.g. to install additional files, see kdepimlibs/gpgme++:
> >> <snip>
> >>
> >>
> >>
> >> Therefore I want to change all CMakeLists.txt from
> >>
> >> install(TARGETS foo DESTINATION ${LIB_INSTALL_DIR} )
> >>
> >> to
> >>
> >> install(TARGETS foo RUNTIME DESTINATION ${BIN_IINSTALL_DIR}
> >>                     LIBRARY DESTINATION ${LIB_INSTALL_DIR}
> >>                     ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
> >>         )
> >>
> >> An additional macro install_kde_library() would work as well.
> >
> > I like the macro idea a beeellion times better.
>
> me too.
>
> > Especially since it documents
> > the intent better (i.e. use this for libraries, not for anything else).
> >
> > Then we could switch libraries to use install_kde4_library() and leave
> > the rest alone.
>
> Because there are already kde4_... macros, i suggest to use
> kde4_install_library() as macro name

If we really want that (I object, will discuss later), the name would have to 
start with KDE4_ .
I'm currently exchanging emails with the cmake developers, so for now please 
don't commit any changes.

A simple thing to do for gpgme would be to add a CMAKE_CONFIG_INSTALL_DIR or 
something like this.

Alex


More information about the Kde-buildsystem mailing list