Improve error message if no Qt is found on the system. Also check for a

minimum version of Qt 4.6.x
This commit is contained in:
Magne Sjaastad 2013-10-16 13:51:42 +02:00
parent 0d4bb9291a
commit f035f4a672

View File

@ -78,7 +78,15 @@ include_directories(
# Qt
################################################################################
set (QT_COMPONENTS_REQUIRED QtCore QtGui QtMain QtOpenGl QtNetwork QtScript QtScriptTools)
find_package (Qt4 COMPONENTS ${QT_COMPONENTS_REQUIRED} REQUIRED)
find_package (Qt4 COMPONENTS ${QT_COMPONENTS_REQUIRED})
if ( NOT Qt4_FOUND )
message(FATAL_ERROR "Package Qt4 is required, but not found. Please specify qmake for variable QT_QMAKE_EXECUTABLE")
endif ( NOT Qt4_FOUND )
if (QT_VERSION_MINOR LESS 6)
message(FATAL_ERROR "Qt 4.6 is required, please specify qmake for variable QT_QMAKE_EXECUTABLE")
endif()
include (${QT_USE_FILE})
# Open GL