[CMake] Bug in original FindQt.cmake

Jens Henrik Goebbert jens.goebbert at post.rwth-aachen.de
Thu Apr 21 21:57:00 EDT 2005


Hi 
While working on FindQt4.cmake I found this bug in the original FindQt.cmake 
in line 129,130,131

Original:
=====
  STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" qt_major_vers 
"${qt_version_str}")
  STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" qt_minor_vers 
"${qt_version_str}")
  STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" qt_patch_vers 
"${qt_version_str}")

CORRECT:
======
STRING(REGEX REPLACE "([0-9]+)[0-9]+[0-9]+" "\\1" qt_major_vers 
"${qt_version_str}")
STRING(REGEX REPLACE "[0-9]+([0-9]+)[0-9]+" "\\1" qt_minor_vers 
"${qt_version_str}")
STRING(REGEX REPLACE "[0-9]+[0-9]+([0-9]+)" "\\1" qt_patch_vers 
"${qt_version_str}")	

because the qt_version_str does not look like "3.6.7" any more. Its "367" 
since line 43 did this:
STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${QGLOBAL_H}")

Because of that qt_minor_vers and qt_patch_vers get not set and are not 
compared with QT_MIN_VERSION.

Bye
	Jens Henrik



More information about the CMake mailing list