Fix cmake's version string handling (change proposed by Jonathan Perkin).

Before this, a text suffix (like "-rc") after the numeric version was needed.
This commit is contained in:
Joerg Bruehe 2010-11-02 19:52:56 +01:00
parent 3202c98c92
commit e032ebd360

View file

@ -42,6 +42,9 @@ MACRO(GET_MYSQL_VERSION)
IF(NOT VERSION_STRING)
FILE(STRINGS configure.in str REGEX "AC_INIT\\(")
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+[-][a-zAZ0-9]+" VERSION_STRING "${str}")
IF(NOT VERSION_STRING)
STRING(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" VERSION_STRING "${str}")
ENDIF()
ENDIF()
ENDIF()
ENDIF()