diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-07-13 20:23:32 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-07-13 20:23:32 (GMT) |
commit | 472c00e3a4ba5b44d503dca828e4b896d56ae502 (patch) | |
tree | 172ecfb54ea45b9dbca9e6bcc79f1fe20b510156 | |
parent | 19ae75a934ffeaad82b24b189691b5f2f2befe9d (diff) | |
download | CMake-472c00e3a4ba5b44d503dca828e4b896d56ae502.zip CMake-472c00e3a4ba5b44d503dca828e4b896d56ae502.tar.gz CMake-472c00e3a4ba5b44d503dca828e4b896d56ae502.tar.bz2 |
ENH: add support for bundles
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 259d8a3..804d761 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -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 += " "; |