OS X: Fix regression handling frameworks for Ninja
Fix a regression created by commit 373faae5
(Refactor how bundles and
frameworks are supported, 2013-05-05).
Since the ninja file isn't aware of how framework symlinks work, we
suppress symlink creation and let cmOSXBundleGenerator handle it. Also,
use the real name of framework library in build rules as was done
before, instead of the symlink.
This commit is contained in:
parent
e645ff0b10
commit
603bc5998f
|
@ -824,13 +824,19 @@ cmGlobalNinjaGenerator
|
||||||
cmLocalNinjaGenerator *ng =
|
cmLocalNinjaGenerator *ng =
|
||||||
static_cast<cmLocalNinjaGenerator *>(this->LocalGenerators[0]);
|
static_cast<cmLocalNinjaGenerator *>(this->LocalGenerators[0]);
|
||||||
|
|
||||||
|
// for frameworks, we want the real name, not smple name
|
||||||
|
// frameworks always appear versioned, and the build.ninja
|
||||||
|
// will always attempt to manage symbolic links instead
|
||||||
|
// of letting cmOSXBundleGenerator do it.
|
||||||
|
bool realname = target->IsFrameworkOnApple();
|
||||||
|
|
||||||
switch (target->GetType()) {
|
switch (target->GetType()) {
|
||||||
case cmTarget::EXECUTABLE:
|
case cmTarget::EXECUTABLE:
|
||||||
case cmTarget::SHARED_LIBRARY:
|
case cmTarget::SHARED_LIBRARY:
|
||||||
case cmTarget::STATIC_LIBRARY:
|
case cmTarget::STATIC_LIBRARY:
|
||||||
case cmTarget::MODULE_LIBRARY:
|
case cmTarget::MODULE_LIBRARY:
|
||||||
outputs.push_back(ng->ConvertToNinjaPath(
|
outputs.push_back(ng->ConvertToNinjaPath(
|
||||||
target->GetFullPath(configName).c_str()));
|
target->GetFullPath(configName, false, realname).c_str()));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case cmTarget::OBJECT_LIBRARY:
|
case cmTarget::OBJECT_LIBRARY:
|
||||||
|
|
|
@ -265,7 +265,8 @@ cmNinjaNormalTargetGenerator
|
||||||
rspcontent);
|
rspcontent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->TargetNameOut != this->TargetNameReal) {
|
if (this->TargetNameOut != this->TargetNameReal &&
|
||||||
|
!this->GetTarget()->IsFrameworkOnApple()) {
|
||||||
std::string cmakeCommand =
|
std::string cmakeCommand =
|
||||||
this->GetLocalGenerator()->ConvertToOutputFormat(
|
this->GetLocalGenerator()->ConvertToOutputFormat(
|
||||||
this->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND"),
|
this->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND"),
|
||||||
|
@ -599,7 +600,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
|
||||||
rspfile,
|
rspfile,
|
||||||
commandLineLengthLimit);
|
commandLineLengthLimit);
|
||||||
|
|
||||||
if (targetOutput != targetOutputReal) {
|
if (targetOutput != targetOutputReal &&
|
||||||
|
!this->GetTarget()->IsFrameworkOnApple()) {
|
||||||
if (targetType == cmTarget::EXECUTABLE) {
|
if (targetType == cmTarget::EXECUTABLE) {
|
||||||
globalGenerator->WriteBuild(this->GetBuildFileStream(),
|
globalGenerator->WriteBuild(this->GetBuildFileStream(),
|
||||||
"Create executable symlink " + targetOutput,
|
"Create executable symlink " + targetOutput,
|
||||||
|
|
Loading…
Reference in New Issue