diff --git a/CMakeLists.txt b/CMakeLists.txt index cf81d393b..6eb785917 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,7 +330,7 @@ if(enable-python OR enable-python-bindings) message(STATUS "python include path ${PYTHON_INCLUDE_DIRS}") message(STATUS "python libraries path ${PYTHON_LIBRARY_PATH}") message(STATUS "python library ${PYTHON_LIBRARY}") - string(REGEX REPLACE "[a-z]+.*$" "" PYTHONLIBS_VERSION_CLEANED "${PYTHONLIBS_VERSION_STRING}") + string(REGEX REPLACE "[-a-z+]+.*$" "" PYTHONLIBS_VERSION_CLEANED "${PYTHONLIBS_VERSION_STRING}") find_package(PythonInterp ${PYTHONLIBS_VERSION_CLEANED} REQUIRED) message(STATUS "python interpreter ${PYTHON_EXECUTABLE}") if(NOT TFEL_PYTHON_SITE_PACKAGES_DIR)