QT_INSTALL_DIR, KDELibsDependencies.cmake and flexible install location of Qt

Patrick Spendrin ps_ml at gmx.de
Thu Dec 31 08:28:14 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Neundorf schrieb:
> Hi,
> 
> I think on Windows there still was an issue with the KDELibsDependencies.cmake 
> file, or more specifically, KDELibs4LibraryTargets-<CONFIG>.cmake, IIRC.
> 
> This file contains the dependency libraries for the installed libraries from 
> kdelibs, mostly, e.g. for Qt, with the full path to the libraries (as they 
> were at kdelibs-cmake time).
> Now if Qt is installed in some other location (on Windows), this leads to 
> problems when somebody tries to build against this (since the dependencies in 
> KDELibs4LibraryTargets-<CONFIG>.cmake point to wrong locations), right ?

Yes. The problem are the hardcoded paths for non-KDE libraries (which
are only Qt so far iirc).

> 
> I didn't figure out completely how the QT_INSTALL_DIR variable is used here...

It isn't I think.

> 
> Do you still have that problem or did you find some solution/workaround for 
> this ?

Yes, problem still persists.

> 
> If not, I think I might have a solution for this issue with Qt.
> This is what I have right now locally in my 
> KDELibs4LibraryTargets-relwithdebinfo.cmake file:
> 
> ...
> # Import target "KDE4__nepomuk" for configuration "RelWithDebInfo"
> SET_PROPERTY(TARGET KDE4__nepomuk APPEND PROPERTY 
>                                   IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
> SET_TARGET_PROPERTIES(KDE4__nepomuk PROPERTIES
> IMPORTED_LINK_DEPENDENT_LIBRARIES_RELWITHDEBINFO "Qt4__QTCORE;Qt4__QTGUI;Qt4__QTDBUS;KDE4__kdecore"
> IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "KDE4__kdeui;/opt/kdesupport/lib/libsoprano.so"
>     IMPORTED_LOCATION_RELWITHDEBINFO "/opt/kdelibs/lib/libnepomuk.so.4.4.0"
>     IMPORTED_SONAME_RELWITHDEBINFO "libnepomuk.so.4"
>   )
> 
> 
> So, instead of the full path to e.g. QtCore.dll there is just "Qt4_QTCORE", 
> which is the name of an "imported" library target for QtCore (maybe it could 
> be named "Imported_Library_Qt4_QTCORE" to make clearer what it is). Where 
> this points to, will be resolved at cmake-time of the application developer 
> (i.e. not at kdelibs-cmake time). Still have to play a bit more with this...
> 
> Would this solve "your" issue ?

Yes, that would be great. This way it could be set by FindQt4.cmake or
set by hand instead.

> 
> Alex

regards,
Patrick

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)

iEYEARECAAYFAks8Uo0ACgkQi49rfdk/G3YokACffq9i/YImuM6yF5/hJFd71WlL
FvkAoJlYD8BPgmMIe3vB+pfHTTsdTv2K
=LaRB
-----END PGP SIGNATURE-----


More information about the Kde-windows mailing list