diff options
author | Byoungchan Lee <byoungchan.lee@gmx.com> | 2018-01-22 16:22:15 (GMT) |
---|---|---|
committer | Byoungchan Lee <byoungchan.lee@gmx.com> | 2018-01-22 16:22:15 (GMT) |
commit | 5cbf3653ff25a42577e9473b447a4b9afb128875 (patch) | |
tree | aa21a34cdc1476a490bc1c1cdb35695d8adddc79 /Source | |
parent | b058d92b33ab37a56ac4dcf2f1e49aec89f554e3 (diff) | |
download | CMake-5cbf3653ff25a42577e9473b447a4b9afb128875.zip CMake-5cbf3653ff25a42577e9473b447a4b9afb128875.tar.gz CMake-5cbf3653ff25a42577e9473b447a4b9afb128875.tar.bz2 |
cmComputeLinkInformation: Better RPATH detection for versioned libraries.
Some libraries uses the non-conventional SONAME scheme like
`libssl.so.1.1` or `libboost_system.so.1.64.0`, but CMake didn't count on
such versioned libraries. This commit modify regular expressions to match
relaxed format of shared library name for determining various linker options,
especially `RPATH`.
Note that support for one component has been available since v2.8.12.
Fixes: #15938
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index fb13a58..18cca5a 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -913,11 +913,9 @@ std::string cmComputeLinkInformation::CreateExtensionRegex( // Finish the list. libext += ")"; - // Add an optional OpenBSD version component. - if (this->OpenBSD) { - libext += "(\\.[0-9]+\\.[0-9]+)?"; - } else if (type == LinkShared) { - libext += "(\\.[0-9]+)?"; + // Add an optional OpenBSD-style version or major.minor.version component. + if (this->OpenBSD || type == LinkShared) { + libext += "(\\.[0-9]+)*"; } libext += "$"; |