mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
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
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user