diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2023-03-01 11:34:13 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2023-03-01 11:34:13 (GMT) |
commit | 764441e672389e24cc2eae7719b9249279e54813 (patch) | |
tree | 83f5484495e1ad1b3a2cb867020c54e7ca21a804 /Modules | |
parent | 47975e60183b55c076df845d8fd835351185d721 (diff) | |
download | CMake-764441e672389e24cc2eae7719b9249279e54813.zip CMake-764441e672389e24cc2eae7719b9249279e54813.tar.gz CMake-764441e672389e24cc2eae7719b9249279e54813.tar.bz2 |
FindPython: fix erroneous ${CMAKE_SHARED_LIBRARY_SUFFIX} matching
Fixes: #24556
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindPython/Support.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index 1b3056f..f1be0f4 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -492,7 +492,7 @@ function (_PYTHON_GET_CONFIG_VAR _PYTHON_PGCV_VALUE NAME) list (REMOVE_DUPLICATES _values) elseif (NAME STREQUAL "SOABI") # clean-up: remove prefix character and suffix - if (_values MATCHES "^(\\.${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.so|\\.pyd)$") + if (_values MATCHES "^(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.so|\\.pyd)$") set(_values "") else() string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}") @@ -543,7 +543,7 @@ function (_PYTHON_GET_CONFIG_VAR _PYTHON_PGCV_VALUE NAME) else() if (_values) # clean-up: remove prefix character and suffix - if (_values MATCHES "^(\\.${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.so|\\.pyd)$") + if (_values MATCHES "^(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.so|\\.pyd)$") set(_values "") else() string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}") @@ -570,7 +570,7 @@ function (_PYTHON_GET_CONFIG_VAR _PYTHON_PGCV_VALUE NAME) endforeach() if (_values) # clean-up: remove prefix character and suffix - if (_values MATCHES "^(\\.${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.so|\\.pyd)$") + if (_values MATCHES "^(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.so|\\.pyd)$") set(_values "") else() string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}") |