diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-07-11 12:33:37 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-07-28 18:41:45 (GMT) |
commit | 9bf8f7de0650a3a904b4947bd5527206e2564724 (patch) | |
tree | 77cef1b9761482c16a49854ba0e4711f7c3ba407 /Source/cmFindLibraryCommand.cxx | |
parent | 07ac0c0ae0bcd7231b6c834303531c313af28090 (diff) | |
download | CMake-9bf8f7de0650a3a904b4947bd5527206e2564724.zip CMake-9bf8f7de0650a3a904b4947bd5527206e2564724.tar.gz CMake-9bf8f7de0650a3a904b4947bd5527206e2564724.tar.bz2 |
find_library(): Add support for .xcframework
Issue: #21752
Diffstat (limited to 'Source/cmFindLibraryCommand.cxx')
-rw-r--r-- | Source/cmFindLibraryCommand.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 6a571b4..df77ad0 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -558,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); @@ -578,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); |