summaryrefslogtreecommitdiffstats
path: root/Modules/FindQt4.cmake
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2011-02-24 00:13:49 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2011-02-24 00:13:49 (GMT)
commit6b9bc54566544e0b1e4687d88d51424cb335114b (patch)
tree9de18837f419fa3c934b23c17fcd89ab87f7912d /Modules/FindQt4.cmake
parentfe449843b7648489fe9fca2ddde231e5e01050ec (diff)
downloadCMake-6b9bc54566544e0b1e4687d88d51424cb335114b.zip
CMake-6b9bc54566544e0b1e4687d88d51424cb335114b.tar.gz
CMake-6b9bc54566544e0b1e4687d88d51424cb335114b.tar.bz2
Fix regression in 43cb9b8.
Put back some code for setting the QT_VERSION_* variables that wasn't supposed to be removed.
Diffstat (limited to 'Modules/FindQt4.cmake')
-rw-r--r--Modules/FindQt4.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 2c3ba6e..b2a89f7 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -1119,6 +1119,11 @@ 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(QT_QMAKE_EXECUTABLE AND QTVERSION)
#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()