summaryrefslogtreecommitdiffstats
path: root/Source/cmFindLibraryCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindLibraryCommand.cxx')
-rw-r--r--Source/cmFindLibraryCommand.cxx26
1 files changed, 24 insertions, 2 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index 9eb0603..df77ad0 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -251,8 +251,14 @@ struct cmFindLibraryHelper
void DebugLibraryFailed(std::string const& name, std::string const& path)
{
if (this->DebugMode) {
- auto regexName =
- cmStrCat(this->PrefixRegexStr, name, this->SuffixRegexStr);
+ // To improve readability of the debug output, if there is only one
+ // prefix/suffix, use the plain prefix/suffix instead of the regex.
+ const auto& prefix = (this->Prefixes.size() == 1) ? this->Prefixes[0]
+ : this->PrefixRegexStr;
+ const auto& suffix = (this->Suffixes.size() == 1) ? this->Suffixes[0]
+ : this->SuffixRegexStr;
+
+ auto regexName = cmStrCat(prefix, name, suffix);
this->DebugSearches.FailedAt(path, regexName);
}
}
@@ -552,6 +558,14 @@ std::string cmFindLibraryCommand::FindFrameworkLibraryNamesPerDir()
// Search for all names in each search path.
for (std::string const& d : this->SearchPaths) {
for (std::string const& n : this->Names) {
+ fwPath = cmStrCat(d, n, ".xcframework");
+ if (cmSystemTools::FileIsDirectory(fwPath)) {
+ auto finalPath = cmSystemTools::CollapseFullPath(fwPath);
+ if (this->Validate(finalPath)) {
+ return finalPath;
+ }
+ }
+
fwPath = cmStrCat(d, n, ".framework");
if (cmSystemTools::FileIsDirectory(fwPath)) {
auto finalPath = cmSystemTools::CollapseFullPath(fwPath);
@@ -572,6 +586,14 @@ std::string cmFindLibraryCommand::FindFrameworkLibraryDirsPerName()
// Search for each name in all search paths.
for (std::string const& n : this->Names) {
for (std::string const& d : this->SearchPaths) {
+ fwPath = cmStrCat(d, n, ".xcframework");
+ if (cmSystemTools::FileIsDirectory(fwPath)) {
+ auto finalPath = cmSystemTools::CollapseFullPath(fwPath);
+ if (this->Validate(finalPath)) {
+ return finalPath;
+ }
+ }
+
fwPath = cmStrCat(d, n, ".framework");
if (cmSystemTools::FileIsDirectory(fwPath)) {
auto finalPath = cmSystemTools::CollapseFullPath(fwPath);