QT_INSTALL_DIR, KDELibsDependencies.cmake and flexible install location of Qt
Alexander Neundorf
neundorf at kde.org
Thu Dec 31 00:23:29 CET 2009
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 ?
I didn't figure out completely how the QT_INSTALL_DIR variable is used here...
Do you still have that problem or did you find some solution/workaround for
this ?
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 ?
Alex
More information about the Kde-windows
mailing list