Commit 3092c27f authored by Kyle Edwards's avatar Kyle Edwards

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
parent b7d72db8
......@@ -45,7 +45,7 @@ function(extract_so_info shared_object libname version)
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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment