diff options
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r-- | Modules/FindQt4.cmake | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index a9e9d82e77..7baa11b7c1 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -547,6 +547,11 @@ endif () if (QT_QMAKE_EXECUTABLE AND QTVERSION) + # set version variables + string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}") + string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}") + string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}") + # ask qmake for the mkspecs directory # we do this first because QT_LIBINFIX might be set if (NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED) @@ -1255,11 +1260,6 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) include("${_qt4_current_dir}/Qt4Macros.cmake") - # set version variables - string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}") - string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}") - string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}") - endif() #support old QT_MIN_VERSION if set, but not if version is supplied by find_package() |