[cmake-developers] [CMake 0013886]: FindQt4.cmake should not look into cmake default path when querying qmake
Mantis Bug Tracker
mantis at public.kitware.com
Fri Feb 1 12:49:15 EST 2013
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=13886
======================================================================
Reported By: David Cournapeau
Assigned To:
======================================================================
Project: CMake
Issue ID: 13886
Category: Modules
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2013-02-01 12:49 EST
Last Modified: 2013-02-01 12:49 EST
======================================================================
Summary: FindQt4.cmake should not look into cmake default
path when querying qmake
Description:
In FindQt4.cmake, line 644, I see:
find_path(QT_QTCORE_INCLUDE_DIR QtCore
HINTS ${qt_headers} ${QT_LIBRARY_DIR}
PATH_SUFFIXES QtCore qt4/QtCore
)
where qt_headers is queried from qmake a few lines before. When you have a
custom built qt AND the official qt, QT_QTCORE_INCLUDE_DIR will be set to the
official qt SDK, even if the custom built qt's qmake is the first one on the
PATH.
This gives confusing compilation errors as one gets a mix of include paths from
the official sdk and library links from the custom built qt.
I could workaround with the following:
find_path(QT_QTCORE_INCLUDE_DIR QtCore
HINTS ${qt_headers} ${QT_LIBRARY_DIR}
PATH_SUFFIXES QtCore qt4/QtCore
NO_CMAKE_SYSTEM_PATH
)
Not using NO_CMAKE_SYSTEM_PATH would make sense in every case as long as one
rely solely on qmake to get variables. If one wants to support looking for sdk
without qmake, one may want to use two different codepaths (when qmake is found
vs not found).
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-02-01 12:49 David CournapeauNew Issue
======================================================================
More information about the cmake-developers
mailing list