[cmake-developers] [CMake 0013985]: FindQt4 fails if Qt5 qmake is called qmake
Mantis Bug Tracker
mantis at public.kitware.com
Tue Mar 5 11:39:29 EST 2013
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13985
======================================================================
Reported By: Janne Rönkkö
Assigned To:
======================================================================
Project: CMake
Issue ID: 13985
Category: CMake
Reproducibility: always
Severity: major
Priority: high
Status: new
======================================================================
Date Submitted: 2013-03-05 11:39 EST
Last Modified: 2013-03-05 11:39 EST
======================================================================
Summary: FindQt4 fails if Qt5 qmake is called qmake
Description:
If Qt4 and Qt5 are installed so that qmake is qmake from Qt5 and qmake4 or
qmake-qt4 is from Qt4 the FindQt4 module does not find Qt4 but says it found
Qt5.
On Archlinux the qmake is currently from Qt5 and qmake-qt4 is the qmake from
Qt4.
The attached patch fixes the issue. I left out some strange find_program code
that should not be needed in reasonably configured system.
Steps to Reproduce:
$ cat ../CMakeLists.txt
cmake_minimum_required( VERSION 2.8 )
project( test )
find_package( Qt4 REQUIRED )
$ cmake ..
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/lib/colorgcc/bin/cc
-- Check for working C compiler: /usr/lib/colorgcc/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/colorgcc/bin/c++
-- Check for working CXX compiler: /usr/lib/colorgcc/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
CMake Error at /usr/share/cmake-2.8/Modules/FindQt4.cmake:1216 (message):
Found unsuitable Qt version "5.0.1" from /usr/bin/qmake, this code requires
Qt 4.x
Call Stack (most recent call first):
CMakeLists.txt:5 (find_package)
-- Configuring incomplete, errors occurred!
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-03-05 11:39 Janne Rönkkö New Issue
2013-03-05 11:39 Janne Rönkkö File Added: 0001-Fix-FindQt4-module.patch
======================================================================
More information about the cmake-developers
mailing list