FindQt4: If Qt5 is in CMAKE_PREFIX_PATH, be sure to find Qt4 includes.

This commit is contained in:
Clinton Stimpson 2013-03-15 08:32:43 -06:00 committed by Brad King
parent 161a793781
commit 252bfd3379
1 changed files with 7 additions and 0 deletions

View File

@ -685,7 +685,14 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
find_path(QT_QTCORE_INCLUDE_DIR QtCore
HINTS ${qt_headers} ${QT_LIBRARY_DIR}
PATH_SUFFIXES QtCore qt4/QtCore
NO_DEFAULT_PATH
)
if(NOT QT_QTCORE_INCLUDE_DIR)
find_path(QT_QTCORE_INCLUDE_DIR QtCore
HINTS ${qt_headers} ${QT_LIBRARY_DIR}
PATH_SUFFIXES QtCore qt4/QtCore
)
endif()
# Set QT_HEADERS_DIR based on finding QtCore header
if(QT_QTCORE_INCLUDE_DIR)