Bug 163438

Summary: Linking fails at windows, qt and kdesupport are assumed to be in D:/kde/kde-mingw/lib/
Product: [Developer tools] buildsystem Reporter: Diederik van der Boor <vdboor>
Component: KDE4 (cmake)Assignee: Patrick Spendrin <ps_ml>
Status: CONFIRMED ---    
Severity: normal CC: aristsakas, dazjorz
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Diederik van der Boor 2008-06-07 12:41:29 UTC
Version:           KDE 4.0.80 (beta1) (using Devel)
Installed from:    Compiled sources
Compiler:          mingw32-make 
OS:                MS Windows

When I'm my application compiling at Windows, it's not possible to link it.

For some reason, the makefile looks for Qt and kdesupport libraries in D:/kde/kde-mingw/lib/. The KDE libraries are detected properly, the others (Qt, libkdewin32.dll, libz.dll, libjpeg.dll, etc..) have the wrong hard coded path.

KDE 4 is installed at: C:\Program Files\KDE4
MinGW is installed at: C:\Program Files\MinGW
My app is compiled from: C:\Documents and Settings\Diederik\kmess2

The spaces in the paths also cause other bugs, but I'll fill a separate report for that.

When I edit build/src/CMakeFiles/kmess.dir, and fix the paths the app is able to compile again.
Comment 1 Diederik van der Boor 2008-07-02 23:55:04 UTC
When I grep for "D:/kde" in my "C:\Program Files\KDE\share" folder it seams many cmake files have this path hard coded somehow.
Comment 2 Patrick Spendrin 2008-07-13 02:33:14 UTC
paths are hardcoded on windows in %KDEROOT%\share\apps\cmake\modules\KDELibsDependenciesInternal.cmake and %KDEROOT%\share\apps\cmake\modules\KDEPimLibsDependencies.cmake .
To build on top of the precompiled packages, please replace the path D:/kde/kde-mingw/ or D:/kde/kde-msvc/ with the install path on your system.

Nevertheless the preferred way to develop KDE applications on windows is this:
http://techbase.kde.org/Getting_Started/Build/KDE4/Windows/emerge
Comment 3 Holger Schröder 2008-08-06 23:03:37 UTC
Hi Saro,

i was just bitten by this bug/feature mself. is there any technical way,
so that we can tell cmake to generate this info at runtime ( from the directory
where the end user installed his kde packages ) ?

or would it be better to adapt the pathes in the files after unpacking
of the zip packages ?

regards, Holger
Comment 4 Sjors Gielen 2009-03-31 18:56:50 UTC
Can confirm. At least the following files contain the D:/kde path reference:
lib/cmake/KdepimLibs-4.2.0/KdepimLibsConfig.cmake
lib/gpgmepp/Gpgmepp{Config,LibraryDepends}.cmake
lib/pkgconfig/{exiv2,libpng,libpng12}.pc
mkspecs/default/qmake.conf
share/apps/cmake/modules/FindBoost.cmake
share/apps/cmake/modules/KDELibs4LibraryTargets-release.cmake
share/apps/cmake/modules/KDELibsDependencies.cmake
share/cmake-2.6/Modules/FindwxWidgets.cmake
share/dbus-1/services/org.kde.knotify.service

That *should* be all. Replacing the D:/kde/kde-mingw paths with ${KDE4_INSTALL_DIR}, at least in the cmake files, should fix this. I'm not sure if this is easy, though...
Comment 5 Justin Zobel 2021-03-09 05:27:05 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.