From 5b9326a0dde8c9fdd6a2d7480208a37b3d53e330 Mon Sep 17 00:00:00 2001 From: Isaak Lim Date: Tue, 31 Jan 2017 09:39:17 +0100 Subject: [PATCH] fix the stripping of the python libs version string where subsequent numbers after 'rc' (release candidate) were not matched correctly --- src/Python/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Python/CMakeLists.txt b/src/Python/CMakeLists.txt index 099786d1..cafb785b 100644 --- a/src/Python/CMakeLists.txt +++ b/src/Python/CMakeLists.txt @@ -66,8 +66,8 @@ IF(OPENMESH_BUILD_PYTHON_BINDINGS) IF(COMPILE_WORKS) # Look for the python interpreter to check if the example works - # strip version string of any characters (e.g. # '+') than 0-9 and . - STRING(REGEX REPLACE "[^ 0-9 | \\.]" "" PYTHONLIBS_VERSION_STRING_STRIPPED ${PYTHONLIBS_VERSION_STRING}) + # strip version string of any characters (e.g. rc1 # '+') than 0-9 and . + STRING(REGEX REPLACE "(rc[0-9]+)|[^ 0-9 | \\.]" "" PYTHONLIBS_VERSION_STRING_STRIPPED ${PYTHONLIBS_VERSION_STRING}) FIND_PACKAGE(PythonInterp ${PYTHONLIBS_VERSION_STRING_STRIPPED} QUIET) IF(PYTHONINTERP_FOUND)