blob: 604cb220399876fa476e0034c7b55981f3d5a72f (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
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: 547222
--- Modules/FindQt4.cmake
+++ Modules/FindQt4.cmake
@@ -482,13 +482,23 @@
get_filename_component(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
- find_program(QT_QMAKE_EXECUTABLE NAMES ${QMAKE_NAME}
- PATHS
- ENV QTDIR
- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]"
- PATH_SUFFIXES bin
- DOC "The qmake executable for the Qt installation to use"
- )
+ if(CMAKE_BUILD_TYPE STREQUAL Gentoo)
+ find_program(QT_QMAKE_EXECUTABLE NAMES ${QMAKE_NAME}
+ PATHS
+ @GENTOO_PORTAGE_EPREFIX@/usr/${CMAKE_INSTALL_LIBDIR}/qt4/bin
+ @GENTOO_PORTAGE_EPREFIX@/usr/bin
+ NO_DEFAULT_PATH
+ DOC "The qmake executable for the Qt installation to use"
+ )
+ else()
+ find_program(QT_QMAKE_EXECUTABLE NAMES ${QMAKE_NAME}
+ PATHS
+ ENV QTDIR
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]"
+ PATH_SUFFIXES bin
+ DOC "The qmake executable for the Qt installation to use"
+ )
+ endif()
set(major 0)
if (QT_QMAKE_EXECUTABLE)
|