fix the stripping of the python libs version string where

subsequent numbers after 'rc' (release candidate) were not matched correctly
This commit is contained in:
Isaak Lim
2017-01-31 09:39:17 +01:00
parent 57bc372adc
commit 5b9326a0dd

View File

@@ -66,8 +66,8 @@ IF(OPENMESH_BUILD_PYTHON_BINDINGS)
IF(COMPILE_WORKS) IF(COMPILE_WORKS)
# Look for the python interpreter to check if the example works # Look for the python interpreter to check if the example works
# strip version string of any characters (e.g. # '+') than 0-9 and . # strip version string of any characters (e.g. rc1 # '+') than 0-9 and .
STRING(REGEX REPLACE "[^ 0-9 | \\.]" "" PYTHONLIBS_VERSION_STRING_STRIPPED ${PYTHONLIBS_VERSION_STRING}) STRING(REGEX REPLACE "(rc[0-9]+)|[^ 0-9 | \\.]" "" PYTHONLIBS_VERSION_STRING_STRIPPED ${PYTHONLIBS_VERSION_STRING})
FIND_PACKAGE(PythonInterp ${PYTHONLIBS_VERSION_STRING_STRIPPED} QUIET) FIND_PACKAGE(PythonInterp ${PYTHONLIBS_VERSION_STRING_STRIPPED} QUIET)
IF(PYTHONINTERP_FOUND) IF(PYTHONINTERP_FOUND)