|
@@ -914,7 +914,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
|
|
|
cmSystemTools::CollapseFullPath(cmStrCat(i, "/../"));
|
|
cmSystemTools::CollapseFullPath(cmStrCat(i, "/../"));
|
|
|
if (emitted.insert(frameworkDir).second) {
|
|
if (emitted.insert(frameworkDir).second) {
|
|
|
if (sysFwSearchFlag && target &&
|
|
if (sysFwSearchFlag && target &&
|
|
|
- target->IsSystemIncludeDirectory(i, config, lang)) {
|
|
|
|
|
|
|
+ target->IsSystemIncludeDirectory(frameworkDir, config, lang)) {
|
|
|
includeFlags << *sysFwSearchFlag;
|
|
includeFlags << *sysFwSearchFlag;
|
|
|
} else {
|
|
} else {
|
|
|
includeFlags << *fwSearchFlag;
|
|
includeFlags << *fwSearchFlag;
|
|
@@ -1645,9 +1645,9 @@ std::vector<BT<std::string>> cmLocalGenerator::GetTargetCompileFlags(
|
|
|
return flags;
|
|
return flags;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-static std::string GetFrameworkFlags(const std::string& lang,
|
|
|
|
|
- const std::string& config,
|
|
|
|
|
- cmGeneratorTarget* target)
|
|
|
|
|
|
|
+std::string cmLocalGenerator::GetFrameworkFlags(std::string const& lang,
|
|
|
|
|
+ std::string const& config,
|
|
|
|
|
+ cmGeneratorTarget* target)
|
|
|
{
|
|
{
|
|
|
cmLocalGenerator* lg = target->GetLocalGenerator();
|
|
cmLocalGenerator* lg = target->GetLocalGenerator();
|
|
|
cmMakefile* mf = lg->GetMakefile();
|
|
cmMakefile* mf = lg->GetMakefile();
|
|
@@ -1656,10 +1656,13 @@ static std::string GetFrameworkFlags(const std::string& lang,
|
|
|
return std::string();
|
|
return std::string();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- std::string fwSearchFlagVar = "CMAKE_" + lang + "_FRAMEWORK_SEARCH_FLAG";
|
|
|
|
|
- cmValue fwSearchFlag = mf->GetDefinition(fwSearchFlagVar);
|
|
|
|
|
- if (!cmNonempty(fwSearchFlag)) {
|
|
|
|
|
- return std::string();
|
|
|
|
|
|
|
+ cmValue fwSearchFlag =
|
|
|
|
|
+ mf->GetDefinition(cmStrCat("CMAKE_", lang, "_FRAMEWORK_SEARCH_FLAG"));
|
|
|
|
|
+ cmValue sysFwSearchFlag = mf->GetDefinition(
|
|
|
|
|
+ cmStrCat("CMAKE_", lang, "_SYSTEM_FRAMEWORK_SEARCH_FLAG"));
|
|
|
|
|
+
|
|
|
|
|
+ if (!fwSearchFlag && !sysFwSearchFlag) {
|
|
|
|
|
+ return std::string{};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
std::set<std::string> emitted;
|
|
std::set<std::string> emitted;
|
|
@@ -1684,7 +1687,12 @@ static std::string GetFrameworkFlags(const std::string& lang,
|
|
|
std::vector<std::string> const& frameworks = cli->GetFrameworkPaths();
|
|
std::vector<std::string> const& frameworks = cli->GetFrameworkPaths();
|
|
|
for (std::string const& framework : frameworks) {
|
|
for (std::string const& framework : frameworks) {
|
|
|
if (emitted.insert(framework).second) {
|
|
if (emitted.insert(framework).second) {
|
|
|
- flags += *fwSearchFlag;
|
|
|
|
|
|
|
+ if (sysFwSearchFlag &&
|
|
|
|
|
+ target->IsSystemIncludeDirectory(framework, config, lang)) {
|
|
|
|
|
+ flags += *sysFwSearchFlag;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ flags += *fwSearchFlag;
|
|
|
|
|
+ }
|
|
|
flags +=
|
|
flags +=
|
|
|
lg->ConvertToOutputFormat(framework, cmOutputConverter::SHELL);
|
|
lg->ConvertToOutputFormat(framework, cmOutputConverter::SHELL);
|
|
|
flags += " ";
|
|
flags += " ";
|
|
@@ -1694,13 +1702,6 @@ static std::string GetFrameworkFlags(const std::string& lang,
|
|
|
return flags;
|
|
return flags;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-std::string cmLocalGenerator::GetFrameworkFlags(std::string const& l,
|
|
|
|
|
- std::string const& config,
|
|
|
|
|
- cmGeneratorTarget* target)
|
|
|
|
|
-{
|
|
|
|
|
- return ::GetFrameworkFlags(l, config, target);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target,
|
|
void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target,
|
|
|
std::string const& config,
|
|
std::string const& config,
|
|
|
std::string const& lang,
|
|
std::string const& lang,
|
|
@@ -1788,10 +1789,13 @@ void cmLocalGenerator::OutputLinkLibraries(
|
|
|
cmStrCat("CMAKE_", cli.GetLinkLanguage(), "_STANDARD_LIBRARIES"));
|
|
cmStrCat("CMAKE_", cli.GetLinkLanguage(), "_STANDARD_LIBRARIES"));
|
|
|
|
|
|
|
|
// Append the framework search path flags.
|
|
// Append the framework search path flags.
|
|
|
- std::string fwSearchFlag = this->Makefile->GetSafeDefinition(
|
|
|
|
|
|
|
+ cmValue fwSearchFlag = this->Makefile->GetDefinition(
|
|
|
cmStrCat("CMAKE_", linkLanguage, "_FRAMEWORK_SEARCH_FLAG"));
|
|
cmStrCat("CMAKE_", linkLanguage, "_FRAMEWORK_SEARCH_FLAG"));
|
|
|
|
|
+ cmValue sysFwSearchFlag = this->Makefile->GetDefinition(
|
|
|
|
|
+ cmStrCat("CMAKE_", linkLanguage, "_SYSTEM_FRAMEWORK_SEARCH_FLAG"));
|
|
|
|
|
|
|
|
- frameworkPath = linkLineComputer->ComputeFrameworkPath(cli, fwSearchFlag);
|
|
|
|
|
|
|
+ frameworkPath =
|
|
|
|
|
+ linkLineComputer->ComputeFrameworkPath(cli, fwSearchFlag, sysFwSearchFlag);
|
|
|
linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator,
|
|
linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator,
|
|
|
linkPath);
|
|
linkPath);
|
|
|
linkLineComputer->ComputeLinkLibraries(cli, stdLibString, linkLibraries);
|
|
linkLineComputer->ComputeLinkLibraries(cli, stdLibString, linkLibraries);
|