Re-factor framework directory computation.
This commit is contained in:
parent
f36c7b0bbe
commit
f8e0a5109f
@ -3688,10 +3688,7 @@ std::string cmTarget::GetInstallNameDirForBuildTree(const char* config,
|
|||||||
dir += "/";
|
dir += "/";
|
||||||
if(this->IsFrameworkOnApple() && !for_xcode)
|
if(this->IsFrameworkOnApple() && !for_xcode)
|
||||||
{
|
{
|
||||||
dir += this->GetFullName(config, false);
|
dir += this->GetFrameworkDirectory(config);
|
||||||
dir += ".framework/Versions/";
|
|
||||||
dir += this->GetFrameworkVersion();
|
|
||||||
dir += "/";
|
|
||||||
}
|
}
|
||||||
return dir;
|
return dir;
|
||||||
}
|
}
|
||||||
@ -3722,10 +3719,7 @@ std::string cmTarget::GetInstallNameDirForInstallTree(const char* config,
|
|||||||
|
|
||||||
if(this->IsFrameworkOnApple() && !for_xcode)
|
if(this->IsFrameworkOnApple() && !for_xcode)
|
||||||
{
|
{
|
||||||
dir += this->GetFullName(config, false);
|
dir += this->GetFrameworkDirectory(config);
|
||||||
dir += ".framework/Versions/";
|
|
||||||
dir += this->GetFrameworkVersion();
|
|
||||||
dir += "/";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return dir;
|
return dir;
|
||||||
@ -4714,6 +4708,17 @@ std::vector<std::string> cmTarget::GetIncludeDirectories()
|
|||||||
return orderedAndUniqueIncludes;
|
return orderedAndUniqueIncludes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
std::string cmTarget::GetFrameworkDirectory(const char* config)
|
||||||
|
{
|
||||||
|
std::string fpath;
|
||||||
|
fpath += this->GetFullName(config, false);
|
||||||
|
fpath += ".framework/Versions/";
|
||||||
|
fpath += this->GetFrameworkVersion();
|
||||||
|
fpath += "/";
|
||||||
|
return fpath;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
std::string cmTarget::BuildMacContentDirectory(const std::string& base,
|
std::string cmTarget::BuildMacContentDirectory(const std::string& base,
|
||||||
const char* config,
|
const char* config,
|
||||||
@ -4729,10 +4734,7 @@ std::string cmTarget::BuildMacContentDirectory(const std::string& base,
|
|||||||
}
|
}
|
||||||
if(this->IsFrameworkOnApple())
|
if(this->IsFrameworkOnApple())
|
||||||
{
|
{
|
||||||
fpath += this->GetFullName(config, false);
|
fpath += this->GetFrameworkDirectory(config);
|
||||||
fpath += ".framework/Versions/";
|
|
||||||
fpath += this->GetFrameworkVersion();
|
|
||||||
fpath += "/";
|
|
||||||
}
|
}
|
||||||
if(this->IsCFBundleOnApple())
|
if(this->IsCFBundleOnApple())
|
||||||
{
|
{
|
||||||
|
@ -478,6 +478,9 @@ public:
|
|||||||
/** @return whether this target have a well defined output file name. */
|
/** @return whether this target have a well defined output file name. */
|
||||||
bool HaveWellDefinedOutputFiles();
|
bool HaveWellDefinedOutputFiles();
|
||||||
|
|
||||||
|
/** @return the Mac framework directory without the base. */
|
||||||
|
std::string GetFrameworkDirectory(const char* config = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* A list of direct dependencies. Use in conjunction with DependencyMap.
|
* A list of direct dependencies. Use in conjunction with DependencyMap.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user