summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-09-14 16:52:10 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-14 18:55:27 (GMT)
commitfc06450ff49db8ebf86977b85206c75de4a40ed3 (patch)
tree0290d6bc1528c72a1496a7589e3df3820e7cad4b /Source/cmGlobalGenerator.cxx
parent31f835410efeea50acd43512eb9e5646a26ea177 (diff)
downloadCMake-fc06450ff49db8ebf86977b85206c75de4a40ed3.zip
CMake-fc06450ff49db8ebf86977b85206c75de4a40ed3.tar.gz
CMake-fc06450ff49db8ebf86977b85206c75de4a40ed3.tar.bz2
Apple: Fix regression when linking a framework with postfix
Fix a regression caused by commit 40178f3c90 (cmGlobalGenerator: Add helper to split framework path, 2022-02-10, v3.24.0-rc1~661^2~1). Fixes: #23961
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 254220b..0fe55f0 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -50,6 +50,7 @@
#include "cmState.h"
#include "cmStateDirectory.h"
#include "cmStateTypes.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmValue.h"
#include "cmVersion.h"
@@ -2570,7 +2571,7 @@ cmGlobalGenerator::SplitFrameworkPath(const std::string& path,
auto name = frameworkPath.match(3);
auto libname =
cmSystemTools::GetFilenameWithoutExtension(frameworkPath.match(6));
- if (!libname.empty() && name != libname) {
+ if (!libname.empty() && !cmHasPrefix(libname, name)) {
return cm::nullopt;
}
return std::pair<std::string, std::string>{ frameworkPath.match(2), name };