Ninja: Add OS X dylib versioning (#14140)
Teach the Ninja generator to add the `-current_version` and the `-compatibility_version` flags based on the VERSION and SOVERSION target properties just as the Makefile generators do. Signed-off-by: Bruce Stephens <bruce.r.stephens@gmail.com>
This commit is contained in:
parent
1f2b39c6ce
commit
9e165a64ad
|
@ -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", >, vars);
|
this->addPoolNinjaVariable("JOB_POOL_LINK", >, vars);
|
||||||
|
|
||||||
this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]);
|
this->AddModuleDefinitionFlag(vars["LINK_FLAGS"]);
|
||||||
|
|
Loading…
Reference in New Issue