[CMake] FIND_PATH issue in FindQt4.cmake

Clinton Stimpson clinton at elemtech.com
Mon Feb 14 18:18:09 EST 2011


On Monday, February 14, 2011 03:27:11 pm Harinarayan Krishnan wrote:
> Hi All,
> 
> I was trying to build the VisIt software package on my Mac OSX 1.5 . This
> package uses Qt 4.6.1 during its build. I ran into an issue where the
> QtCore path finds my globally installed version of Qt (4.7) as apposed to
> the Qt (4.6.1).
> 
> While digging around I found that FIND_PATH (code included below) in
> FindQt4.cmake is pulling information from the system path and assigning
> this value to the QT_QTCORE_INCLUDE_DIR. This is causing a build failure
> where the rest of the QT headers are using 4.6.1 and QtCore is using
> version 4.7.
> 
> The value in ${qt_headers} points to the correct 4.6.1 location yet
> FIND_PATH does not use this parameter. Any ideas?
> 
> 
>      _qt4_query_qmake(QT_INSTALL_HEADERS qt_headers)
>      SET(QT_QTCORE_INCLUDE_DIR NOTFOUND)
>      FIND_PATH(QT_QTCORE_INCLUDE_DIR QtCore
>                HINTS ${qt_headers}
>                ${QT_LIBRARY_DIR}/QtCore.framework/Headers
>                PATH_SUFFIXES QtCore
>        )
> 

Ok, I'm able to reproduce this problem.
I did notice that if I add the NO_CMAKE_SYSTEM_PATH option, then the problem 
goes away.  But, I thought HINTS had a higher priority than paths from the 
Mac's platform files.
And, I don't see this problem on Linux.
Is this a bug in find_path() ??

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com


More information about the CMake mailing list