From dc5d1d793457792c690d55e419059f0002415a0c Mon Sep 17 00:00:00 2001
From: Cody Krieger <cody@evaautomation.com>
Date: Tue, 25 Aug 2015 08:40:27 -0700
Subject: [PATCH] Add support for Xcode ORGANIZATIONNAME project setting via
 CMAKE_XCODE_ORGANIZATIONNAME.

I chose CMAKE_XCODE as the prefix rather than CMAKE_XCODE_ATTRIBUTE to
avoid having ORGANIZATIONNAME added to the buildSettings group of every
target. (ORGANIZATIONNAME is a project-level attribute, and isn't
evaluated at the target level.)
---
 Source/cmGlobalXCodeGenerator.cxx | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 39933cb..493c63a 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3360,6 +3360,12 @@ bool cmGlobalXCodeGenerator
     group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
     group->AddAttribute("BuildIndependentTargetsInParallel",
                         this->CreateString("YES"));
+
+    const char* orgName =
+      this->CurrentMakefile->GetDefinition("CMAKE_XCODE_ORGANIZATIONNAME");
+    if (orgName)
+      group->AddAttribute("ORGANIZATIONNAME", this->CreateString(orgName));
+
     this->RootObject->AddAttribute("attributes", group);
     if (this->XcodeVersion >= 32)
       this->RootObject->AddAttribute("compatibilityVersion",
-- 
2.3.2 (Apple Git-55)

