summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2012-03-02 17:06:57 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-03-02 17:08:37 (GMT)
commit9dae4d65d7e1ae0348478c6c2f4d2f0f307bf573 (patch)
tree240b396bcb3e5f0c9ddb11f789d6a4153cae4204 /Modules
parent2cd898d54b7068d78d719ad23131707b300624a7 (diff)
downloadCMake-9dae4d65d7e1ae0348478c6c2f4d2f0f307bf573.zip
CMake-9dae4d65d7e1ae0348478c6c2f4d2f0f307bf573.tar.gz
CMake-9dae4d65d7e1ae0348478c6c2f4d2f0f307bf573.tar.bz2
FindQt3: fix version extraction for versions with letters
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindQt3.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index 69d2f65..5ee2d06 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -71,8 +71,8 @@ ENDIF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h)
IF(QT_INCLUDE_DIR)
#extract the version string from qglobal.h
FILE(READ ${QT_INCLUDE_DIR}/qglobal.h QGLOBAL_H)
- STRING(REGEX MATCH "#define[\t ]+QT_VERSION_STR[\t ]+\"([0-9]+.[0-9]+.[0-9]+)\"" QGLOBAL_H "${QGLOBAL_H}")
- STRING(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+)\".*" "\\1" qt_version_str "${QGLOBAL_H}")
+ STRING(REGEX MATCH "#define[\t ]+QT_VERSION_STR[\t ]+\"[0-9]+.[0-9]+.[0-9]+[a-z]*\"" QGLOBAL_H "${QGLOBAL_H}")
+ STRING(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+[a-z]*)\".*" "\\1" qt_version_str "${QGLOBAL_H}")
# Under windows the qt library (MSVC) has the format qt-mtXYZ where XYZ is the
# version X.Y.Z, so we need to remove the dots from version