Abort FindQt4.cmake if Qt 5 is found.
This commit is contained in:
parent
3817314e2a
commit
1dfe15c431
|
@ -1169,10 +1169,22 @@ ELSE( Qt4_FIND_COMPONENTS )
|
||||||
|
|
||||||
ENDIF( Qt4_FIND_COMPONENTS )
|
ENDIF( Qt4_FIND_COMPONENTS )
|
||||||
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
|
if (${QT_VERSION_MAJOR} GREATER 4)
|
||||||
REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS}
|
SET(VERSION_MSG "Found unsuitable Qt version \"${QTVERSION}\" from ${QT_QMAKE_EXECUTABLE}")
|
||||||
VERSION_VAR QTVERSION
|
SET(QT4_FOUND FALSE)
|
||||||
)
|
IF(Qt4_FIND_REQUIRED)
|
||||||
|
MESSAGE( FATAL_ERROR "${VERSION_MSG}, this code requires Qt 4.x")
|
||||||
|
ELSE(Qt4_FIND_REQUIRED)
|
||||||
|
IF(NOT Qt4_FIND_QUIETLY)
|
||||||
|
MESSAGE( STATUS "${VERSION_MSG}")
|
||||||
|
ENDIF(NOT Qt4_FIND_QUIETLY)
|
||||||
|
ENDIF(Qt4_FIND_REQUIRED)
|
||||||
|
else()
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4
|
||||||
|
REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS}
|
||||||
|
VERSION_VAR QTVERSION
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue