Commit 373faae5 authored by Clinton Stimpson's avatar Clinton Stimpson Committed by Brad King
Browse files

Refactor how bundles and frameworks are supported.

Make handling of directory separators consistent between
non-bundle and bundle code.

Remove xcode specific flag from cmTarget when getting install_name.

Add (more) consistent convenience functions in cmTarget to get
directories inside of bundles and frameworks to add files to.

This refactor also fixes bug #12263 where frameworks
had the wrong install name when SKIP_BUILD_RPATH.

Also make install_name for frameworks consistent between Makefile
and Xcode generator.
parent 78185f59
...@@ -143,7 +143,7 @@ cmExportBuildFileGenerator ...@@ -143,7 +143,7 @@ cmExportBuildFileGenerator
std::string prop = "IMPORTED_LOCATION"; std::string prop = "IMPORTED_LOCATION";
prop += suffix; prop += suffix;
std::string value; std::string value;
if(target->IsFrameworkOnApple() || target->IsAppBundleOnApple()) if(target->IsAppBundleOnApple())
{ {
value = target->GetFullPath(config, false); value = target->GetFullPath(config, false);
} }
......
...@@ -351,13 +351,7 @@ cmExportInstallFileGenerator ...@@ -351,13 +351,7 @@ cmExportInstallFileGenerator
prop += suffix; prop += suffix;
// Append the installed file name. // Append the installed file name.
if(target->IsFrameworkOnApple()) if(target->IsCFBundleOnApple())
{
value += itgen->GetInstallFilename(target, config);
value += ".framework/";
value += itgen->GetInstallFilename(target, config);
}
else if(target->IsCFBundleOnApple())
{ {
const char *ext = target->GetProperty("BUNDLE_EXTENSION"); const char *ext = target->GetProperty("BUNDLE_EXTENSION");
if (!ext) if (!ext)
......
...@@ -1823,6 +1823,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, ...@@ -1823,6 +1823,11 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
pndir = target.GetDirectory(configName); pndir = target.GetDirectory(configName);
} }
if(target.IsFrameworkOnApple())
{
pnprefix = "";
}
buildSettings->AddAttribute("EXECUTABLE_PREFIX", buildSettings->AddAttribute("EXECUTABLE_PREFIX",
this->CreateString(pnprefix.c_str())); this->CreateString(pnprefix.c_str()));
buildSettings->AddAttribute("EXECUTABLE_SUFFIX", buildSettings->AddAttribute("EXECUTABLE_SUFFIX",
...@@ -2156,14 +2161,14 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, ...@@ -2156,14 +2161,14 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
if(target.GetType() == cmTarget::SHARED_LIBRARY) if(target.GetType() == cmTarget::SHARED_LIBRARY)
{ {
// Get the install_name directory for the build tree. // Get the install_name directory for the build tree.
install_name_dir = target.GetInstallNameDirForBuildTree(configName, true); install_name_dir = target.GetInstallNameDirForBuildTree(configName);
if(install_name_dir.empty()) if(install_name_dir.empty())
{ {
// Xcode will not pass the -install_name option at all if INSTALL_PATH // Xcode will not pass the -install_name option at all if INSTALL_PATH
// is not given or is empty. We must explicitly put the flag in the // is not given or is empty. We must explicitly put the flag in the
// link flags to create an install_name with just the library soname. // link flags to create an install_name with just the library soname.
extraLinkOptions += " -install_name "; extraLinkOptions += " -install_name ";
extraLinkOptions += target.GetFullName(configName); extraLinkOptions += target.GetSOName(configName);
} }
else else
{ {
......
...@@ -198,14 +198,12 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, ...@@ -198,14 +198,12 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
// Install the whole framework directory. // Install the whole framework directory.
type = cmInstallType_DIRECTORY; type = cmInstallType_DIRECTORY;
literal_args += " USE_SOURCE_PERMISSIONS"; literal_args += " USE_SOURCE_PERMISSIONS";
std::string from1 = fromDirConfig + targetName + ".framework";
std::string from1 = fromDirConfig + targetName;
from1 = cmSystemTools::GetFilenamePath(from1);
// Tweaks apply to the binary inside the bundle. // Tweaks apply to the binary inside the bundle.
std::string to1 = toDir + targetName; std::string to1 = toDir + targetNameReal;
to1 += ".framework/Versions/";
to1 += this->Target->GetFrameworkVersion();
to1 += "/";
to1 += targetName;
filesFrom.push_back(from1); filesFrom.push_back(from1);
filesTo.push_back(to1); filesTo.push_back(to1);
...@@ -528,7 +526,7 @@ cmInstallTargetGenerator ...@@ -528,7 +526,7 @@ cmInstallTargetGenerator
// components of the install_name field then we need to create a // components of the install_name field then we need to create a
// mapping to be applied after installation. // mapping to be applied after installation.
std::string for_build = tgt->GetInstallNameDirForBuildTree(config); std::string for_build = tgt->GetInstallNameDirForBuildTree(config);
std::string for_install = tgt->GetInstallNameDirForInstallTree(config); std::string for_install = tgt->GetInstallNameDirForInstallTree();
if(for_build != for_install) if(for_build != for_install)
{ {
// The directory portions differ. Append the filename to // The directory portions differ. Append the filename to
...@@ -555,7 +553,7 @@ cmInstallTargetGenerator ...@@ -555,7 +553,7 @@ cmInstallTargetGenerator
std::string for_build = std::string for_build =
this->Target->GetInstallNameDirForBuildTree(config); this->Target->GetInstallNameDirForBuildTree(config);
std::string for_install = std::string for_install =
this->Target->GetInstallNameDirForInstallTree(config); this->Target->GetInstallNameDirForInstallTree();
if(this->Target->IsFrameworkOnApple() && for_install.empty()) if(this->Target->IsFrameworkOnApple() && for_install.empty())
{ {
......
...@@ -30,11 +30,8 @@ cmMakefileExecutableTargetGenerator ...@@ -30,11 +30,8 @@ cmMakefileExecutableTargetGenerator
this->TargetNamePDB, this->ConfigName); this->TargetNamePDB, this->ConfigName);
this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target, this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target,
this->TargetNameOut,
this->ConfigName); this->ConfigName);
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders); this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
this->MacContentDirectory =
this->OSXBundleGenerator->GetMacContentDirectory();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -103,11 +100,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) ...@@ -103,11 +100,11 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
// Construct the full path version of the names. // Construct the full path version of the names.
std::string outpath = this->Target->GetDirectory(this->ConfigName); std::string outpath = this->Target->GetDirectory(this->ConfigName);
outpath += "/";
if(this->Target->IsAppBundleOnApple()) if(this->Target->IsAppBundleOnApple())
{ {
this->OSXBundleGenerator->CreateAppBundle(targetName, outpath); this->OSXBundleGenerator->CreateAppBundle(targetName, outpath);
} }
outpath += "/";
std::string outpathImp; std::string outpathImp;
if(relink) if(relink)
{ {
......
...@@ -32,11 +32,8 @@ cmMakefileLibraryTargetGenerator ...@@ -32,11 +32,8 @@ cmMakefileLibraryTargetGenerator
this->TargetNameImport, this->TargetNamePDB, this->ConfigName); this->TargetNameImport, this->TargetNamePDB, this->ConfigName);
this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target, this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target,
this->TargetNameOut,
this->ConfigName); this->ConfigName);
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders); this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
this->MacContentDirectory =
this->OSXBundleGenerator->GetMacContentDirectory();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -292,14 +289,15 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules ...@@ -292,14 +289,15 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
std::string outpathImp; std::string outpathImp;
if(this->Target->IsFrameworkOnApple()) if(this->Target->IsFrameworkOnApple())
{ {
outpath = this->MacContentDirectory; outpath = this->Target->GetDirectory(this->ConfigName);
this->OSXBundleGenerator->CreateFramework(targetName); this->OSXBundleGenerator->CreateFramework(targetName, outpath);
outpath += "/";
} }
else if(this->Target->IsCFBundleOnApple()) else if(this->Target->IsCFBundleOnApple())
{ {
outpath = this->Target->GetDirectory(this->ConfigName); outpath = this->Target->GetDirectory(this->ConfigName);
outpath += "/";
this->OSXBundleGenerator->CreateCFBundle(targetName, outpath); this->OSXBundleGenerator->CreateCFBundle(targetName, outpath);
outpath += "/";
} }
else if(relink) else if(relink)
{ {
...@@ -727,7 +725,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules ...@@ -727,7 +725,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
commands1.clear(); commands1.clear();
// Add a rule to create necessary symlinks for the library. // Add a rule to create necessary symlinks for the library.
if(targetOutPath != targetOutPathReal) // Frameworks are handled by cmOSXBundleGenerator.
if(targetOutPath != targetOutPathReal && !this->Target->IsFrameworkOnApple())
{ {
std::string symlink = "$(CMAKE_COMMAND) -E cmake_symlink_library "; std::string symlink = "$(CMAKE_COMMAND) -E cmake_symlink_library ";
symlink += targetOutPathReal; symlink += targetOutPathReal;
......
...@@ -357,7 +357,7 @@ cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator() ...@@ -357,7 +357,7 @@ cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()
(cmSourceFile& source, const char* pkgloc) (cmSourceFile& source, const char* pkgloc)
{ {
// Skip OS X content when not building a Framework or Bundle. // Skip OS X content when not building a Framework or Bundle.
if(this->Generator->MacContentDirectory.empty()) if(!this->Generator->GetTarget()->IsBundleOnApple())
{ {
return; return;
} }
......
...@@ -233,7 +233,6 @@ protected: ...@@ -233,7 +233,6 @@ protected:
std::string TargetNamePDB; std::string TargetNamePDB;
// Mac OS X content info. // Mac OS X content info.
std::string MacContentDirectory;
std::set<cmStdString> MacContentFolders; std::set<cmStdString> MacContentFolders;
cmOSXBundleGenerator* OSXBundleGenerator; cmOSXBundleGenerator* OSXBundleGenerator;
MacOSXContentGeneratorType* MacOSXContentGenerator; MacOSXContentGeneratorType* MacOSXContentGenerator;
......
...@@ -25,11 +25,8 @@ cmMakefileUtilityTargetGenerator ...@@ -25,11 +25,8 @@ cmMakefileUtilityTargetGenerator
{ {
this->CustomCommandDriver = OnUtility; this->CustomCommandDriver = OnUtility;
this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target, this->OSXBundleGenerator = new cmOSXBundleGenerator(this->Target,
this->TargetNameOut,
this->ConfigName); this->ConfigName);
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders); this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
this->MacContentDirectory =
this->OSXBundleGenerator->GetMacContentDirectory();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
...@@ -61,7 +61,6 @@ cmNinjaNormalTargetGenerator(cmTarget* target) ...@@ -61,7 +61,6 @@ cmNinjaNormalTargetGenerator(cmTarget* target)
} }
this->OSXBundleGenerator = new cmOSXBundleGenerator(target, this->OSXBundleGenerator = new cmOSXBundleGenerator(target,
this->TargetNameOut,
this->GetConfigName()); this->GetConfigName());
this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders); this->OSXBundleGenerator->SetMacContentFolders(&this->MacContentFolders);
} }
...@@ -383,24 +382,32 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() ...@@ -383,24 +382,32 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
if (this->GetTarget()->IsAppBundleOnApple()) if (this->GetTarget()->IsAppBundleOnApple())
{ {
// Create the app bundle // Create the app bundle
std::string outpath; std::string outpath =
this->GetTarget()->GetDirectory(this->GetConfigName());
this->OSXBundleGenerator->CreateAppBundle(this->TargetNameOut, outpath); this->OSXBundleGenerator->CreateAppBundle(this->TargetNameOut, outpath);
// Calculate the output path // Calculate the output path
targetOutput = outpath + this->TargetNameOut; targetOutput = outpath;
targetOutput += "/";
targetOutput += this->TargetNameOut;
targetOutput = this->ConvertToNinjaPath(targetOutput.c_str()); targetOutput = this->ConvertToNinjaPath(targetOutput.c_str());
targetOutputReal = outpath + this->TargetNameReal; targetOutputReal = outpath;
targetOutputReal += "/";
targetOutputReal += this->TargetNameReal;
targetOutputReal = this->ConvertToNinjaPath(targetOutputReal.c_str()); targetOutputReal = this->ConvertToNinjaPath(targetOutputReal.c_str());
} }
else if (this->GetTarget()->IsFrameworkOnApple()) else if (this->GetTarget()->IsFrameworkOnApple())
{ {
// Create the library framework. // Create the library framework.
this->OSXBundleGenerator->CreateFramework(this->TargetNameOut); std::string outpath =
this->GetTarget()->GetDirectory(this->GetConfigName());
this->OSXBundleGenerator->CreateFramework(this->TargetNameOut, outpath);
} }
else if(this->GetTarget()->IsCFBundleOnApple()) else if(this->GetTarget()->IsCFBundleOnApple())
{ {
// Create the core foundation bundle. // Create the core foundation bundle.
std::string outpath; std::string outpath =
this->GetTarget()->GetDirectory(this->GetConfigName());
this->OSXBundleGenerator->CreateCFBundle(this->TargetNameOut, outpath); this->OSXBundleGenerator->CreateCFBundle(this->TargetNameOut, outpath);
} }
......
...@@ -701,7 +701,7 @@ cmNinjaTargetGenerator::MacOSXContentGeneratorType::operator()( ...@@ -701,7 +701,7 @@ cmNinjaTargetGenerator::MacOSXContentGeneratorType::operator()(
cmSourceFile& source, const char* pkgloc) cmSourceFile& source, const char* pkgloc)
{ {
// Skip OS X content when not building a Framework or Bundle. // Skip OS X content when not building a Framework or Bundle.
if(this->Generator->OSXBundleGenerator->GetMacContentDirectory().empty()) if(!this->Generator->GetTarget()->IsBundleOnApple())
{ {
return; return;
} }
......
...@@ -28,26 +28,16 @@ void cmOSXBundleGenerator::PrepareTargetProperties(cmTarget* target) ...@@ -28,26 +28,16 @@ void cmOSXBundleGenerator::PrepareTargetProperties(cmTarget* target)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
cmOSXBundleGenerator:: cmOSXBundleGenerator::
cmOSXBundleGenerator(cmTarget* target, cmOSXBundleGenerator(cmTarget* target,
std::string targetNameOut,
const char* configName) const char* configName)
: Target(target) : Target(target)
, Makefile(target->GetMakefile()) , Makefile(target->GetMakefile())
, LocalGenerator(Makefile->GetLocalGenerator()) , LocalGenerator(Makefile->GetLocalGenerator())
, TargetNameOut(targetNameOut)
, ConfigName(configName) , ConfigName(configName)
, MacContentDirectory()
, FrameworkVersion()
, MacContentFolders(0) , MacContentFolders(0)
{ {
if (this->MustSkip()) if (this->MustSkip())
return; return;
this->MacContentDirectory =
this->Target->GetMacContentDirectory(this->ConfigName,
/*implib*/ false,
/*includeMacOS*/ false);
if(this->Target->IsFrameworkOnApple())
this->FrameworkVersion = this->Target->GetFrameworkVersion();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -57,41 +47,60 @@ bool cmOSXBundleGenerator::MustSkip() ...@@ -57,41 +47,60 @@ bool cmOSXBundleGenerator::MustSkip()
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmOSXBundleGenerator::CreateAppBundle(std::string& targetName, void cmOSXBundleGenerator::CreateAppBundle(const std::string& targetName,
std::string& outpath) std::string& outpath)
{ {
if (this->MustSkip()) if (this->MustSkip())
return; return;
// Compute bundle directory names. // Compute bundle directory names.
outpath = this->MacContentDirectory; std::string out = outpath;
outpath += "MacOS"; out += "/";
cmSystemTools::MakeDirectory(outpath.c_str()); out += this->Target->GetAppBundleDirectory(this->ConfigName, false);
outpath += "/"; cmSystemTools::MakeDirectory(out.c_str());
this->Makefile->AddCMakeOutputFile(outpath.c_str()); this->Makefile->AddCMakeOutputFile(out.c_str());
std::string newoutpath = out;
// Configure the Info.plist file. Note that it needs the executable name // Configure the Info.plist file. Note that it needs the executable name
// to be set. // to be set.
std::string plist = this->MacContentDirectory + "Info.plist"; std::string plist = outpath;
plist += "/";
plist += this->Target->GetAppBundleDirectory(this->ConfigName, true);
plist += "/Info.plist";
this->LocalGenerator->GenerateAppleInfoPList(this->Target, this->LocalGenerator->GenerateAppleInfoPList(this->Target,
targetName.c_str(), targetName.c_str(),
plist.c_str()); plist.c_str());
this->Makefile->AddCMakeOutputFile(plist.c_str()); this->Makefile->AddCMakeOutputFile(plist.c_str());
outpath = newoutpath;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmOSXBundleGenerator::CreateFramework(std::string const& targetName) void cmOSXBundleGenerator::CreateFramework(
const std::string& targetName, const std::string& outpath)
{ {
if (this->MustSkip()) if (this->MustSkip())
return; return;
assert(this->MacContentFolders); assert(this->MacContentFolders);
// Compute the location of the top-level foo.framework directory.
std::string contentdir = outpath + "/" +
this->Target->GetFrameworkDirectory(this->ConfigName, true);
contentdir += "/";
std::string newoutpath = outpath + "/" +
this->Target->GetFrameworkDirectory(this->ConfigName, false);
std::string frameworkVersion = this->Target->GetFrameworkVersion();
// Configure the Info.plist file into the Resources directory. // Configure the Info.plist file into the Resources directory.
this->MacContentFolders->insert("Resources"); this->MacContentFolders->insert("Resources");
std::string plist = this->MacContentDirectory + "Resources/Info.plist"; std::string plist = newoutpath;
plist += "/Resources/Info.plist";
std::string name = cmSystemTools::GetFilenameName(targetName);
this->LocalGenerator->GenerateFrameworkInfoPList(this->Target, this->LocalGenerator->GenerateFrameworkInfoPList(this->Target,
targetName.c_str(), name.c_str(),
plist.c_str()); plist.c_str());
// TODO: Use the cmMakefileTargetGenerator::ExtraFiles vector to // TODO: Use the cmMakefileTargetGenerator::ExtraFiles vector to
...@@ -99,25 +108,17 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName) ...@@ -99,25 +108,17 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName)
std::string oldName; std::string oldName;
std::string newName; std::string newName;
// Compute the location of the top-level foo.framework directory.
std::string top = this->Target->GetDirectory(this->ConfigName);
top += "/";
top += this->TargetNameOut;
top += ".framework/";
// Make foo.framework/Versions // Make foo.framework/Versions
std::string versions = top; std::string versions = contentdir;
versions += "Versions"; versions += "Versions";
cmSystemTools::MakeDirectory(versions.c_str()); cmSystemTools::MakeDirectory(versions.c_str());
// Make foo.framework/Versions/version // Make foo.framework/Versions/version
std::string version = versions; cmSystemTools::MakeDirectory(newoutpath.c_str());
version += "/";
version += this->FrameworkVersion;
cmSystemTools::MakeDirectory(version.c_str());
// Current -> version // Current -> version
oldName = this->FrameworkVersion; oldName = frameworkVersion;
newName = versions; newName = versions;
newName += "/Current"; newName += "/Current";
cmSystemTools::RemoveFile(newName.c_str()); cmSystemTools::RemoveFile(newName.c_str());
...@@ -126,9 +127,9 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName) ...@@ -126,9 +127,9 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName)
// foo -> Versions/Current/foo // foo -> Versions/Current/foo
oldName = "Versions/Current/"; oldName = "Versions/Current/";
oldName += this->TargetNameOut; oldName += name;
newName = top; newName = contentdir;
newName += this->TargetNameOut; newName += name;
cmSystemTools::RemoveFile(newName.c_str()); cmSystemTools::RemoveFile(newName.c_str());
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str()); cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
this->Makefile->AddCMakeOutputFile(newName.c_str()); this->Makefile->AddCMakeOutputFile(newName.c_str());
...@@ -138,7 +139,7 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName) ...@@ -138,7 +139,7 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName)
this->MacContentFolders->end()) this->MacContentFolders->end())
{ {
oldName = "Versions/Current/Resources"; oldName = "Versions/Current/Resources";
newName = top; newName = contentdir;
newName += "Resources"; newName += "Resources";
cmSystemTools::RemoveFile(newName.c_str()); cmSystemTools::RemoveFile(newName.c_str());
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str()); cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
...@@ -150,7 +151,7 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName) ...@@ -150,7 +151,7 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName)
this->MacContentFolders->end()) this->MacContentFolders->end())
{ {
oldName = "Versions/Current/Headers"; oldName = "Versions/Current/Headers";
newName = top; newName = contentdir;
newName += "Headers"; newName += "Headers";
cmSystemTools::RemoveFile(newName.c_str()); cmSystemTools::RemoveFile(newName.c_str());
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str()); cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
...@@ -162,7 +163,7 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName) ...@@ -162,7 +163,7 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName)
this->MacContentFolders->end()) this->MacContentFolders->end())
{ {
oldName = "Versions/Current/PrivateHeaders"; oldName = "Versions/Current/PrivateHeaders";
newName = top; newName = contentdir;
newName += "PrivateHeaders"; newName += "PrivateHeaders";
cmSystemTools::RemoveFile(newName.c_str()); cmSystemTools::RemoveFile(newName.c_str());
cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str()); cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str());
...@@ -171,27 +172,32 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName) ...@@ -171,27 +172,32 @@ void cmOSXBundleGenerator::CreateFramework(std::string const& targetName)
} }
//----------------------------------------------------------------------------