summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkLineComputer.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-05-10 09:40:37 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-05-11 08:24:18 (GMT)
commitad9020a89922eff4b817ba6278d31a412cc17601 (patch)
tree5bc482a6739d3c48a0c2bfc38bf29ebcff51601a /Source/cmLinkLineComputer.cxx
parent65430031a61105f9c8bae57e3731fe133e931b11 (diff)
downloadCMake-ad9020a89922eff4b817ba6278d31a412cc17601.zip
CMake-ad9020a89922eff4b817ba6278d31a412cc17601.tar.gz
CMake-ad9020a89922eff4b817ba6278d31a412cc17601.tar.bz2
Apple Frameworks: honor SYSTEM target property
Fixes: #24109
Diffstat (limited to 'Source/cmLinkLineComputer.cxx')
-rw-r--r--Source/cmLinkLineComputer.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx
index ba0c138..b7ee4fa 100644
--- a/Source/cmLinkLineComputer.cxx
+++ b/Source/cmLinkLineComputer.cxx
@@ -191,16 +191,24 @@ std::string cmLinkLineComputer::ComputeRPath(cmComputeLinkInformation& cli)
}
std::string cmLinkLineComputer::ComputeFrameworkPath(
- cmComputeLinkInformation& cli, std::string const& fwSearchFlag)
+ cmComputeLinkInformation& cli, cmValue fwSearchFlag, cmValue sysFwSearchFlag)
{
+ if (!fwSearchFlag && !sysFwSearchFlag) {
+ return std::string{};
+ }
+
std::string frameworkPath;
- if (!fwSearchFlag.empty()) {
- std::vector<std::string> const& fwDirs = cli.GetFrameworkPaths();
- for (std::string const& fd : fwDirs) {
+ auto const& fwDirs = cli.GetFrameworkPaths();
+ for (auto const& fd : fwDirs) {
+ if (sysFwSearchFlag &&
+ cli.GetTarget()->IsSystemIncludeDirectory(fd, cli.GetConfig(),
+ cli.GetLinkLanguage())) {
+ frameworkPath += sysFwSearchFlag;
+ } else {
frameworkPath += fwSearchFlag;
- frameworkPath += this->ConvertToOutputFormat(fd);
- frameworkPath += " ";
}
+ frameworkPath += this->ConvertToOutputFormat(fd);
+ frameworkPath += " ";
}
return frameworkPath;
}