summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 17561b5..c34df3c 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -504,6 +504,16 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
}
}
+ // Add OS X version flags, if any.
+ if(this->GeneratorTarget->GetType() == cmState::SHARED_LIBRARY ||
+ this->GeneratorTarget->GetType() == cmState::MODULE_LIBRARY)
+ {
+ this->AppendOSXVerFlag(vars["LINK_FLAGS"], this->TargetLinkLanguage,
+ "COMPATIBILITY", true);
+ this->AppendOSXVerFlag(vars["LINK_FLAGS"], this->TargetLinkLanguage,
+ "CURRENT", false);
+ }
+
this->addPoolNinjaVariable("JOB_POOL_LINK", &gt, vars);
this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]);