summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-06-12 14:13:43 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-06-12 14:13:43 (GMT)
commit3092c27f30b52e737a499a3eb91b2a160e9f3863 (patch)
tree6d72e47d8b0c336bd0d80cb98db05a93f4d48007 /Modules
parentb7d72db89de6a9ddc8c8740a6e8b8980d108b900 (diff)
downloadCMake-3092c27f30b52e737a499a3eb91b2a160e9f3863.zip
CMake-3092c27f30b52e737a499a3eb91b2a160e9f3863.tar.gz
CMake-3092c27f30b52e737a499a3eb91b2a160e9f3863.tar.bz2
CPack: Fix SONAME regex in DEB generator
The DEB generator was written to parse output from GNU readelf. However, LLVM's readelf has a slightly different output format, without parentheses around the word "SONAME". Update the regex to account for this difference. Fixes: #19362
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Internal/CPack/CPackDeb.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Internal/CPack/CPackDeb.cmake b/Modules/Internal/CPack/CPackDeb.cmake
index 89dc6f0..7791822 100644
--- a/Modules/Internal/CPack/CPackDeb.cmake
+++ b/Modules/Internal/CPack/CPackDeb.cmake
@@ -45,7 +45,7 @@ function(extract_so_info shared_object libname version)
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(result EQUAL 0)
- string(REGEX MATCH "\\(SONAME\\)[^\n]*\\[([^\n]+)\\.so\\.([^\n]*)\\]" soname "${output}")
+ string(REGEX MATCH "\\(?SONAME\\)?[^\n]*\\[([^\n]+)\\.so\\.([^\n]*)\\]" soname "${output}")
set(${libname} "${CMAKE_MATCH_1}" PARENT_SCOPE)
set(${version} "${CMAKE_MATCH_2}" PARENT_SCOPE)
else()