summaryrefslogtreecommitdiff
path: root/kde-base/kdelibs/files/kdelibs-4.14.13-FindQt4.patch
blob: 2e8c2d9e4c82b2e59c1c217bce157febae5f5df5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Ensure that the correct version of Qt is always used.

With the introduction qt-4.8.6, Qt binaries were moved from /usr/bin to
/usr/$(get_libdir)/qt4/bin, leaving behind in their place symlinks to qtchooser.

There is no guarantee to which version of Qt these symlinks might point, so it
is necessary to find the correct version explicitly.

Once qmake is found, it is queried for the correct location of all other items.

Gentoo-bug: 562746

--- cmake/modules/FindQt4.cmake
+++ cmake/modules/FindQt4.cmake
@@ -447,10 +447,9 @@ GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trollte
 # Debian uses qmake-qt4
 # macports' Qt uses qmake-mac
 FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
-  "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
-  $ENV{QTDIR}/bin
+  /usr/${CMAKE_INSTALL_LIBDIR}/qt4/bin
+  /usr/bin
+  NO_DEFAULT_PATH
   DOC "The qmake executable for the Qt installation to use"
 )