View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013886CMakeModulespublic2013-02-01 12:492016-06-10 14:31
ReporterDavid Cournapeau 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformMac OS XOSMac OS XOS Version10.7
Product VersionCMake 2.8.10.1 
Target VersionFixed in Version 
Summary0013886: FindQt4.cmake should not look into cmake default path when querying qmake
DescriptionIn 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).
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0032186)
Clinton Stimpson (developer)
2013-02-01 12:55

It is that way to support cross compiling.

The tools, moc, uic, qmake, etc... are found in the native bin directory, but the includes and libraries can come from another Qt installation.

HINTS comes before CMAKE_SYSTEM_PATH, so your problem is that the
"HINTS ${qt_headers} ${QT_LIBRARY_DIR} "
part is not working. Can you debug it to find out why?
(0042214)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2013-02-01 12:49 David Cournapeau New Issue
2013-02-01 12:55 Clinton Stimpson Note Added: 0032186
2016-06-10 14:28 Kitware Robot Note Added: 0042214
2016-06-10 14:28 Kitware Robot Status new => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:28 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team