瀏覽代碼

cmLocalGenerator: Port PList handling to cmGeneratorTarget.

Stephen Kelly 10 年之前
父節點
當前提交
37ab74a607
共有 4 個文件被更改,包括 12 次插入11 次删除
  1. 3 3
      Source/cmGlobalXCodeGenerator.cxx
  2. 3 3
      Source/cmLocalGenerator.cxx
  3. 3 2
      Source/cmLocalGenerator.h
  4. 3 3
      Source/cmOSXBundleGenerator.cxx

+ 3 - 3
Source/cmGlobalXCodeGenerator.cxx

@@ -2062,7 +2062,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
       // a per-configuration Info.plist file. The cfbundle plist
       // is very similar to the application bundle plist
       this->CurrentLocalGenerator
-        ->GenerateAppleInfoPList(&target, "$(EXECUTABLE_NAME)",
+        ->GenerateAppleInfoPList(gtgt, "$(EXECUTABLE_NAME)",
                                  plist.c_str());
       std::string path =
         this->ConvertToRelativeForXCode(plist.c_str());
@@ -2111,7 +2111,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
       // so let it replace the framework name. This avoids creating
       // a per-configuration Info.plist file.
       this->CurrentLocalGenerator
-        ->GenerateFrameworkInfoPList(&target, "$(EXECUTABLE_NAME)",
+        ->GenerateFrameworkInfoPList(gtgt, "$(EXECUTABLE_NAME)",
                                      plist.c_str());
       std::string path =
         this->ConvertToRelativeForXCode(plist.c_str());
@@ -2154,7 +2154,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
       // so let it replace the executable name.  This avoids creating
       // a per-configuration Info.plist file.
       this->CurrentLocalGenerator
-        ->GenerateAppleInfoPList(&target, "$(EXECUTABLE_NAME)",
+        ->GenerateAppleInfoPList(gtgt, "$(EXECUTABLE_NAME)",
                                  plist.c_str());
       std::string path =
         this->ConvertToRelativeForXCode(plist.c_str());

+ 3 - 3
Source/cmLocalGenerator.cxx

@@ -3012,7 +3012,7 @@ bool cmLocalGenerator::CheckDefinition(std::string const& define) const
 }
 
 //----------------------------------------------------------------------------
-static void cmLGInfoProp(cmMakefile* mf, cmTarget* target,
+static void cmLGInfoProp(cmMakefile* mf, cmGeneratorTarget* target,
     const std::string& prop)
 {
   if(const char* val = target->GetProperty(prop))
@@ -3022,7 +3022,7 @@ static void cmLGInfoProp(cmMakefile* mf, cmTarget* target,
 }
 
 //----------------------------------------------------------------------------
-void cmLocalGenerator::GenerateAppleInfoPList(cmTarget* target,
+void cmLocalGenerator::GenerateAppleInfoPList(cmGeneratorTarget* target,
                                               const std::string& targetName,
                                               const char* fname)
 {
@@ -3066,7 +3066,7 @@ void cmLocalGenerator::GenerateAppleInfoPList(cmTarget* target,
 }
 
 //----------------------------------------------------------------------------
-void cmLocalGenerator::GenerateFrameworkInfoPList(cmTarget* target,
+void cmLocalGenerator::GenerateFrameworkInfoPList(cmGeneratorTarget* target,
                                                 const std::string& targetName,
                                                 const char* fname)
 {

+ 3 - 2
Source/cmLocalGenerator.h

@@ -279,13 +279,14 @@ public:
   /**
    * Generate a Mac OS X application bundle Info.plist file.
    */
-  void GenerateAppleInfoPList(cmTarget* target, const std::string& targetName,
+  void GenerateAppleInfoPList(cmGeneratorTarget* target,
+                              const std::string& targetName,
                               const char* fname);
 
   /**
    * Generate a Mac OS X framework Info.plist file.
    */
-  void GenerateFrameworkInfoPList(cmTarget* target,
+  void GenerateFrameworkInfoPList(cmGeneratorTarget* target,
                                   const std::string& targetName,
                                   const char* fname);
   /** Construct a comment for a custom command.  */

+ 3 - 3
Source/cmOSXBundleGenerator.cxx

@@ -59,7 +59,7 @@ void cmOSXBundleGenerator::CreateAppBundle(const std::string& targetName,
   plist += "/";
   plist += this->GT->GetAppBundleDirectory(this->ConfigName, true);
   plist += "/Info.plist";
-  this->LocalGenerator->GenerateAppleInfoPList(this->GT->Target,
+  this->LocalGenerator->GenerateAppleInfoPList(this->GT,
                                                targetName,
                                                plist.c_str());
   this->Makefile->AddCMakeOutputFile(plist);
@@ -90,7 +90,7 @@ void cmOSXBundleGenerator::CreateFramework(
   std::string plist = newoutpath;
   plist += "/Resources/Info.plist";
   std::string name = cmSystemTools::GetFilenameName(targetName);
-  this->LocalGenerator->GenerateFrameworkInfoPList(this->GT->Target,
+  this->LocalGenerator->GenerateFrameworkInfoPList(this->GT,
                                                    name,
                                                    plist.c_str());
 
@@ -182,7 +182,7 @@ void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName,
     this->GT->GetCFBundleDirectory(this->ConfigName, true);
   plist += "/Info.plist";
   std::string name = cmSystemTools::GetFilenameName(targetName);
-  this->LocalGenerator->GenerateAppleInfoPList(this->GT->Target,
+  this->LocalGenerator->GenerateAppleInfoPList(this->GT,
                                                name,
                                                plist.c_str());
   this->Makefile->AddCMakeOutputFile(plist);