Merge topic 'link-OpenBSD-shared-libs-issue-12954'
afc75bb
Recognize OpenBSD versioned .so names (#12954)
This commit is contained in:
commit
e1a6c9b9a1
|
@ -248,6 +248,10 @@ cmComputeLinkInformation
|
|||
this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
|
||||
this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance();
|
||||
|
||||
// Check whether to recognize OpenBSD-style library versioned names.
|
||||
this->OpenBSD = this->Makefile->GetCMakeInstance()
|
||||
->GetPropertyAsBool("FIND_LIBRARY_USE_OPENBSD_VERSIONING");
|
||||
|
||||
// The configuration being linked.
|
||||
this->Config = config;
|
||||
|
||||
|
@ -973,7 +977,15 @@ cmComputeLinkInformation
|
|||
}
|
||||
|
||||
// Finish the list.
|
||||
libext += ")$";
|
||||
libext += ")";
|
||||
|
||||
// Add an optional OpenBSD version component.
|
||||
if(this->OpenBSD)
|
||||
{
|
||||
libext += "(\\.[0-9]+\\.[0-9]+)?";
|
||||
}
|
||||
|
||||
libext += "$";
|
||||
return libext;
|
||||
}
|
||||
|
||||
|
|
|
@ -128,6 +128,7 @@ private:
|
|||
cmsys::RegularExpression ExtractSharedLibraryName;
|
||||
cmsys::RegularExpression ExtractAnyLibraryName;
|
||||
std::string SharedRegexString;
|
||||
bool OpenBSD;
|
||||
void AddLinkPrefix(const char* p);
|
||||
void AddLinkExtension(const char* e, LinkType type);
|
||||
std::string CreateExtensionRegex(std::vector<std::string> const& exts);
|
||||
|
|
Loading…
Reference in New Issue