mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 22:10:32 +00:00
Re-factor OS X content generator start up.
This commit is contained in:
parent
f8e0a5109f
commit
c3988ee871
@ -367,18 +367,8 @@ cmMakefileTargetGenerator::MacOSXContentGeneratorType::operator()
|
||||
return;
|
||||
}
|
||||
|
||||
// Construct the full path to the content subdirectory.
|
||||
std::string macdir = this->Generator->MacContentDirectory;
|
||||
macdir += pkgloc;
|
||||
cmSystemTools::MakeDirectory(macdir.c_str());
|
||||
|
||||
// Record use of this content location. Only the first level
|
||||
// directory is needed.
|
||||
{
|
||||
std::string loc = pkgloc;
|
||||
loc = loc.substr(0, loc.find('/'));
|
||||
this->Generator->MacContentFolders.insert(loc);
|
||||
}
|
||||
std::string macdir =
|
||||
this->Generator->OSXBundleGenerator->InitMacOSXContentDirectory(pkgloc);
|
||||
|
||||
// Get the input file location.
|
||||
std::string input = source.GetFullPath();
|
||||
|
@ -664,19 +664,8 @@ cmNinjaTargetGenerator::MacOSXContentGeneratorType::operator()(
|
||||
return;
|
||||
}
|
||||
|
||||
// Construct the full path to the content subdirectory.
|
||||
std::string macdir =
|
||||
this->Generator->OSXBundleGenerator->GetMacContentDirectory();
|
||||
macdir += pkgloc;
|
||||
cmSystemTools::MakeDirectory(macdir.c_str());
|
||||
|
||||
// Record use of this content location. Only the first level
|
||||
// directory is needed.
|
||||
{
|
||||
std::string loc = pkgloc;
|
||||
loc = loc.substr(0, loc.find('/'));
|
||||
this->Generator->MacContentFolders.insert(loc);
|
||||
}
|
||||
this->Generator->OSXBundleGenerator->InitMacOSXContentDirectory(pkgloc);
|
||||
|
||||
// Get the input file location.
|
||||
std::string input = source.GetFullPath();
|
||||
|
@ -214,3 +214,23 @@ GenerateMacOSXContentStatements(std::vector<cmSourceFile*> const& sources,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string
|
||||
cmOSXBundleGenerator::InitMacOSXContentDirectory(const char* pkgloc)
|
||||
{
|
||||
// Construct the full path to the content subdirectory.
|
||||
std::string macdir = this->MacContentDirectory;
|
||||
macdir += pkgloc;
|
||||
cmSystemTools::MakeDirectory(macdir.c_str());
|
||||
|
||||
// Record use of this content location. Only the first level
|
||||
// directory is needed.
|
||||
{
|
||||
std::string loc = pkgloc;
|
||||
loc = loc.substr(0, loc.find('/'));
|
||||
this->MacContentFolders->insert(loc);
|
||||
}
|
||||
|
||||
return macdir;
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
void GenerateMacOSXContentStatements(
|
||||
std::vector<cmSourceFile*> const& sources,
|
||||
MacOSXContentGeneratorType* generator);
|
||||
std::string InitMacOSXContentDirectory(const char* pkgloc);
|
||||
|
||||
std::string GetMacContentDirectory() const
|
||||
{ return this->MacContentDirectory; }
|
||||
|
Loading…
Reference in New Issue
Block a user