AW: Install dlls to /bin

Nhuh Put nhuh.put at web.de
Fri Jul 13 13:57:27 CEST 2007


This is from cmake help:
The short version is, on linux, .so is treated as a library, only on
Windows, dlls are treated as runtime. 

The TARGETS form specifies rules for installing targets from a project.
There are three kinds of target files that may be installed:
archive, library, and runtime.  Executables are always treated as runtime
targets.  Static libraries are always treated as archive targets.  Module
libraries are always treated as library targets.  For non-DLL platforms
shared libraries are treated as library targets.
For DLL platforms the DLL part of a shared library is treated as a runtime
target and the corresponding import library is treated as an archive target.
All Windows-based systems including Cygwin are DLL platforms.  The ARCHIVE,
LIBRARY, and RUNTIME arguments change the type of target to which the
subsequent properties apply.  If none is given the installation properties
apply to all target types.  If only one is given then only targets of that
type will be installed (which can be used to install just a DLL or just an
import library).

One or more groups of properties may be specified in a single call to the
TARGETS form of this command.  A target may be installed more than once to
different locations.  Consider hypothetical targets "myExe", "mySharedLib",
and "myStaticLib".  The code

    INSTALL(TARGETS myExe mySharedLib myStaticLib
            RUNTIME DESTINATION bin
            LIBRARY DESTINATION lib
            ARCHIVE DESTINATION lib/static)
    INSTALL(TARGETS mySharedLib DESTINATION /some/full/path)

will install myExe to <prefix>/bin and myStaticLib to <prefix>/lib/static.
On non-DLL platforms mySharedLib will be installed to <prefix>/lib and
/some/full/path.  On DLL platforms the mySharedLib DLL will be installed to
<prefix>/bin and /some/full/path and its import library will be installed to
<prefix>/lib/static and /some/full/path.  On non-DLL platforms mySharedLib
will be installed to <prefix>/lib and /some/full/path.

-----Ursprüngliche Nachricht-----
Von: ralf.habacker at freenet.de 
Betreff: Re: Install dlls to /bin

Nhuh Put schrieb:
> Hello
> This patch changes the default installation directory for dll files from
> /lib to /bin on Windows.
>
> 	PutHuhn
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Kde-windows mailing list
> Kde-windows at kde.org
> https://mail.kde.org/mailman/listinfo/kde-windows
>   
Thanks for your effort. Do you have thought about the fact that if we
apply this patch it breaks installation on unix ?
On unix is must be

+install(TARGETS kdeinit_kconf_update
+             RUNTIME DESTINATION ${LIB_INSTALL_DIR}
+             LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+             ARCHIVE DESTINATION ${LIB_INSTALL_DIR}

which is done by the command 

install(TARGETS kdeinit_kconf_update  DESTINATION ${LIB_INSTALL_DIR} )

it is required to do something like this

+install(TARGETS kdeinit_kconf_update
+             RUNTIME DESTINATION ${LIB_RUNTIME_INSTALL_DIR}
+             LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+             ARCHIVE DESTINATION ${LIB_INSTALL_DIR}

and to set LIB_RUNTIME_INSTALL_DIR on a central place depending on the os.

I've redirected this mail to kde-buildsystem. Probably they can say more
how to solve the problem.

Ralf




More information about the Kde-windows mailing list