Commit 472c00e3 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: add support for bundles

parent 19ae75a9
......@@ -901,14 +901,39 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
break;
}
case cmTarget::EXECUTABLE:
{
std::string symRoot;
if(m_ExecutableOutputPath.size())
{
std::string path = m_ExecutableOutputPath;
if(target.GetPropertyAsBool("MACOSX_BUNDLE"))
{
path += target.GetName();
path += ".app/Contents/MacOS/";
}
symRoot = path;
}
fileType = "compiled.mach-o.executable";
if(target.GetPropertyAsBool("MACOSX_BUNDLE"))
{
if(symRoot.size() == 0)
{
symRoot = target.GetName();
symRoot += ".app/Contents/MacOS/";
}
productType = "com.apple.product-type.tool";
}
else
{
productType = "com.apple.product-type.tool";
}
if(symRoot.size())
{
buildSettings->AddAttribute("SYMROOT",
this->CreateString
(m_ExecutableOutputPath.c_str()));
(symRoot.c_str()));
}
fileType = "compiled.mach-o.executable";
productType = "com.apple.product-type.tool";
}
break;
case cmTarget::UTILITY:
......@@ -1139,7 +1164,7 @@ void cmGlobalXCodeGenerator::AddLinkLibrary(cmXCodeObject* target,
cmXCodeObject* ldflags = settings->GetObject("OTHER_LDFLAGS");
std::string link = ldflags->GetString();
cmSystemTools::ReplaceString(link, "\"", "");
cmsys::RegularExpression reg("^([ \t]*\\-[lWRB])|([ \t]*\\-framework)|(\\${)|([ \t]*\\-pthread)|([ \t]*`)");
cmsys::RegularExpression reg("^([ \t]*\\-[lLWRB])|([ \t]*\\-framework)|(\\${)|([ \t]*\\-pthread)|([ \t]*`)");
// if the library is not already in the form required by the compiler
// add a -l infront of the name
link += " ";
......
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