diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index d07cc3d712..b7ff7f3014 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2799,17 +2799,20 @@ bool cmGlobalXCodeGenerator::CreateGroups( this->GroupMap[key] = pbxgroup; } - // Put OBJECT_LIBRARY objects in proper groups: - std::vector objs; - gtgt->UseObjectLibraries(objs, ""); - for (std::vector::const_iterator oi = objs.begin(); - oi != objs.end(); ++oi) { - std::string const& source = *oi; - cmSourceGroup* sourceGroup = - mf->FindSourceGroup(source.c_str(), sourceGroups); - cmXCodeObject* pbxgroup = this->CreateOrGetPBXGroup(gtgt, sourceGroup); - std::string key = GetGroupMapKeyFromPath(gtgt, source); - this->GroupMap[key] = pbxgroup; + if (this->XcodeVersion < 50) { + // Put OBJECT_LIBRARY objects in proper groups: + std::vector objs; + gtgt->UseObjectLibraries(objs, ""); + for (std::vector::const_iterator oi = objs.begin(); + oi != objs.end(); ++oi) { + std::string const& source = *oi; + cmSourceGroup* sourceGroup = + mf->FindSourceGroup(source.c_str(), sourceGroups); + cmXCodeObject* pbxgroup = + this->CreateOrGetPBXGroup(gtgt, sourceGroup); + std::string key = GetGroupMapKeyFromPath(gtgt, source); + this->GroupMap[key] = pbxgroup; + } } } }