diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-07-13 14:03:32 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-07-13 14:03:32 (GMT) |
commit | b0d86400d9a9121c1b9f6ed5029bdadfd5064c6b (patch) | |
tree | b9ab8059980d0c9c6f0f974f9fe56ebe6d7c5186 /Modules | |
parent | 0e0eec11628f9451d247525ee0ae9bae944140f1 (diff) | |
download | CMake-b0d86400d9a9121c1b9f6ed5029bdadfd5064c6b.zip CMake-b0d86400d9a9121c1b9f6ed5029bdadfd5064c6b.tar.gz CMake-b0d86400d9a9121c1b9f6ed5029bdadfd5064c6b.tar.bz2 |
BUG: These regular expressions were wrong because \\t does not match tab. Also, this fix prevents whole file to be dumped to the cache
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindQt.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake index 3a1caca..737c71f 100644 --- a/Modules/FindQt.cmake +++ b/Modules/FindQt.cmake @@ -33,10 +33,12 @@ IF(QT_INCLUDE_DIR) #extract the version string from qglobal.h FILE(READ ${QT_INCLUDE_DIR}/qglobal.h QGLOBAL_H) - STRING(REGEX REPLACE ".*#define[\\t\\ ]+QT_VERSION_STR[\\t\\ ]+\"([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]+)\"" QGLOBAL_H "${QGLOBAL_H}") + STRING(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+)\".*" "\\1" QGLOBAL_H "${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 - STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}") + STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${QGLOBAL_H}") ELSE(QT_INCLUDE_DIR) MESSAGE(STATUS "Did not find Qt headers (qglobal.h)") ENDIF(QT_INCLUDE_DIR) |