|
@@ -2482,6 +2482,16 @@ void cmTarget::MarkAsImported()
|
|
|
this->IsImportedTarget = true;
|
|
this->IsImportedTarget = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+bool cmTarget::HaveWellDefinedOutputFiles()
|
|
|
|
|
+{
|
|
|
|
|
+ return
|
|
|
|
|
+ this->GetType() == cmTarget::STATIC_LIBRARY ||
|
|
|
|
|
+ this->GetType() == cmTarget::SHARED_LIBRARY ||
|
|
|
|
|
+ this->GetType() == cmTarget::MODULE_LIBRARY ||
|
|
|
|
|
+ this->GetType() == cmTarget::EXECUTABLE;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
//----------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------
|
|
|
cmTarget::OutputInfo const* cmTarget::GetOutputInfo(const char* config)
|
|
cmTarget::OutputInfo const* cmTarget::GetOutputInfo(const char* config)
|
|
|
{
|
|
{
|
|
@@ -2492,10 +2502,7 @@ cmTarget::OutputInfo const* cmTarget::GetOutputInfo(const char* config)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Only libraries and executables have well-defined output files.
|
|
// Only libraries and executables have well-defined output files.
|
|
|
- if(this->GetType() != cmTarget::STATIC_LIBRARY &&
|
|
|
|
|
- this->GetType() != cmTarget::SHARED_LIBRARY &&
|
|
|
|
|
- this->GetType() != cmTarget::MODULE_LIBRARY &&
|
|
|
|
|
- this->GetType() != cmTarget::EXECUTABLE)
|
|
|
|
|
|
|
+ if(!this->HaveWellDefinedOutputFiles())
|
|
|
{
|
|
{
|
|
|
std::string msg = "cmTarget::GetOutputInfo called for ";
|
|
std::string msg = "cmTarget::GetOutputInfo called for ";
|
|
|
msg += this->GetName();
|
|
msg += this->GetName();
|
|
@@ -2586,18 +2593,7 @@ const char* cmTarget::NormalGetLocation(const char* config)
|
|
|
this->Location += cfgid;
|
|
this->Location += cfgid;
|
|
|
this->Location += "/";
|
|
this->Location += "/";
|
|
|
}
|
|
}
|
|
|
- if(this->IsAppBundleOnApple())
|
|
|
|
|
- {
|
|
|
|
|
- this->Location += this->GetFullName(config, false);
|
|
|
|
|
- this->Location += ".app/Contents/MacOS/";
|
|
|
|
|
- }
|
|
|
|
|
- if(this->IsFrameworkOnApple())
|
|
|
|
|
- {
|
|
|
|
|
- this->Location += this->GetFullName(config, false);
|
|
|
|
|
- this->Location += ".framework/Versions/";
|
|
|
|
|
- this->Location += this->GetFrameworkVersion();
|
|
|
|
|
- this->Location += "/";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this->Location = this->BuildMacContentDirectory(this->Location, config);
|
|
|
this->Location += this->GetFullName(config, false);
|
|
this->Location += this->GetFullName(config, false);
|
|
|
return this->Location.c_str();
|
|
return this->Location.c_str();
|
|
|
}
|
|
}
|
|
@@ -3169,35 +3165,7 @@ std::string cmTarget::GetFullPath(const char* config, bool implib,
|
|
|
std::string cmTarget::NormalGetFullPath(const char* config, bool implib,
|
|
std::string cmTarget::NormalGetFullPath(const char* config, bool implib,
|
|
|
bool realname)
|
|
bool realname)
|
|
|
{
|
|
{
|
|
|
- // TODO: Re-factor with cmOSXBundleGenerator's constructor.
|
|
|
|
|
- // Start with the output directory for the target.
|
|
|
|
|
- std::string fpath = this->GetDirectory(config, implib);
|
|
|
|
|
- fpath += "/";
|
|
|
|
|
-
|
|
|
|
|
- if(this->IsAppBundleOnApple())
|
|
|
|
|
- {
|
|
|
|
|
- fpath += this->GetFullName(config, false);
|
|
|
|
|
- fpath += ".app/Contents/MacOS/";
|
|
|
|
|
- }
|
|
|
|
|
- if(this->IsFrameworkOnApple())
|
|
|
|
|
- {
|
|
|
|
|
- fpath += this->GetFullName(config, false);
|
|
|
|
|
- fpath += ".framework/Versions/";
|
|
|
|
|
- fpath += this->GetFrameworkVersion();
|
|
|
|
|
- fpath += "/";
|
|
|
|
|
- }
|
|
|
|
|
- if(this->IsCFBundleOnApple())
|
|
|
|
|
- {
|
|
|
|
|
- fpath += this->GetFullName(config, false);
|
|
|
|
|
- fpath += ".";
|
|
|
|
|
- const char *ext = this->GetProperty("BUNDLE_EXTENSION");
|
|
|
|
|
- if (!ext)
|
|
|
|
|
- {
|
|
|
|
|
- ext = "bundle";
|
|
|
|
|
- }
|
|
|
|
|
- fpath += ext;
|
|
|
|
|
- fpath += "/Contents/MacOS/";
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ std::string fpath = this->GetMacContentDirectory(config, implib);
|
|
|
|
|
|
|
|
// Add the full name of the target.
|
|
// Add the full name of the target.
|
|
|
if(implib)
|
|
if(implib)
|
|
@@ -4746,6 +4714,55 @@ std::vector<std::string> cmTarget::GetIncludeDirectories()
|
|
|
return orderedAndUniqueIncludes;
|
|
return orderedAndUniqueIncludes;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+std::string cmTarget::BuildMacContentDirectory(const std::string& base,
|
|
|
|
|
+ const char* config,
|
|
|
|
|
+ bool includeMacOS)
|
|
|
|
|
+{
|
|
|
|
|
+ std::string fpath = base;
|
|
|
|
|
+ if(this->IsAppBundleOnApple())
|
|
|
|
|
+ {
|
|
|
|
|
+ fpath += this->GetFullName(config, false);
|
|
|
|
|
+ fpath += ".app/Contents/";
|
|
|
|
|
+ if(includeMacOS)
|
|
|
|
|
+ fpath += "MacOS/";
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this->IsFrameworkOnApple())
|
|
|
|
|
+ {
|
|
|
|
|
+ fpath += this->GetFullName(config, false);
|
|
|
|
|
+ fpath += ".framework/Versions/";
|
|
|
|
|
+ fpath += this->GetFrameworkVersion();
|
|
|
|
|
+ fpath += "/";
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this->IsCFBundleOnApple())
|
|
|
|
|
+ {
|
|
|
|
|
+ fpath += this->GetFullName(config, false);
|
|
|
|
|
+ fpath += ".";
|
|
|
|
|
+ const char *ext = this->GetProperty("BUNDLE_EXTENSION");
|
|
|
|
|
+ if (!ext)
|
|
|
|
|
+ {
|
|
|
|
|
+ ext = "bundle";
|
|
|
|
|
+ }
|
|
|
|
|
+ fpath += ext;
|
|
|
|
|
+ fpath += "/Contents/";
|
|
|
|
|
+ if(includeMacOS)
|
|
|
|
|
+ fpath += "MacOS/";
|
|
|
|
|
+ }
|
|
|
|
|
+ return fpath;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
|
|
+std::string cmTarget::GetMacContentDirectory(const char* config,
|
|
|
|
|
+ bool implib,
|
|
|
|
|
+ bool includeMacOS)
|
|
|
|
|
+{
|
|
|
|
|
+ // Start with the output directory for the target.
|
|
|
|
|
+ std::string fpath = this->GetDirectory(config, implib);
|
|
|
|
|
+ fpath += "/";
|
|
|
|
|
+ fpath = this->BuildMacContentDirectory(fpath, config, includeMacOS);
|
|
|
|
|
+ return fpath;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
//----------------------------------------------------------------------------
|
|
//----------------------------------------------------------------------------
|
|
|
cmTargetLinkInformationMap
|
|
cmTargetLinkInformationMap
|
|
|
::cmTargetLinkInformationMap(cmTargetLinkInformationMap const& r): derived()
|
|
::cmTargetLinkInformationMap(cmTargetLinkInformationMap const& r): derived()
|