Commit bd33da9f authored by Brad King's avatar Brad King 💬
Browse files

Add Xcode SYMROOT setting for custom targets

Xcode 1.5 writes helper scripts at the projectDirPath location for
targets that do not set SYMROOT.  We now add SYMROOT to custom targets
so that all targets set it.  This prevents Xcode 1.5 from touching the
source directory now that we always set projectDirPath.

See issue #8481.
parent 8ffc8147
...@@ -1531,19 +1531,20 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, ...@@ -1531,19 +1531,20 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
this->CreateString(pnbase.c_str())); this->CreateString(pnbase.c_str()));
// Set attributes to specify the proper name for the target. // Set attributes to specify the proper name for the target.
std::string pndir = this->CurrentMakefile->GetCurrentOutputDirectory();
if(target.GetType() == cmTarget::STATIC_LIBRARY || if(target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY || target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_LIBRARY || target.GetType() == cmTarget::MODULE_LIBRARY ||
target.GetType() == cmTarget::EXECUTABLE) target.GetType() == cmTarget::EXECUTABLE)
{ {
std::string pndir = target.GetDirectory(); pndir = target.GetDirectory();
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",
this->CreateString(pnsuffix.c_str())); this->CreateString(pnsuffix.c_str()));
} }
// Handle settings for each target type. // Handle settings for each target type.
switch(target.GetType()) switch(target.GetType())
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment