[Cmake-commits] [cmake-commits] king committed cmGlobalXCodeGenerator.cxx 1.190 1.191 cmGlobalXCodeGenerator.h 1.52 1.53

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Jul 3 13:28:56 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv7606/Source

Modified Files:
	cmGlobalXCodeGenerator.cxx cmGlobalXCodeGenerator.h 
Log Message:
BUG: Fix Xcode reference to Info.plist resource

  - Generated Xcode projects for application bundles list the
    CMake-generated Info.plist input file as a resource.
  - The location of the input file was moved by a previous commit,
    but the reference to it as a resource file was not updated.
  - This change moves the file to CMakeFiles/<tgt>.dir/Info.plist
    to give it a more intuitive name in the Xcode project.
  - We also update the reference to point at the correct location.
  - See bug #7277.


Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.190
retrieving revision 1.191
diff -C 2 -d -r1.190 -r1.191
*** cmGlobalXCodeGenerator.cxx	3 Jul 2008 17:28:49 -0000	1.190
--- cmGlobalXCodeGenerator.cxx	3 Jul 2008 17:28:54 -0000	1.191
***************
*** 1476,1484 ****
        {
        productType = "com.apple.product-type.application";
!       std::string plist = this->CurrentMakefile->GetCurrentOutputDirectory();
!       plist += cmake::GetCMakeFilesDirectory();
!       plist += "/";
!       plist += target.GetName();
!       plist += "Info.plist";
        // Xcode will create the final version of Info.plist at build time,
        // so let it replace the executable name.  This avoids creating
--- 1476,1480 ----
        {
        productType = "com.apple.product-type.application";
!       std::string plist = this->ComputeInfoPListLocation(target);
        // Xcode will create the final version of Info.plist at build time,
        // so let it replace the executable name.  This avoids creating
***************
*** 2214,2222 ****
        if(cmtarget.GetPropertyAsBool("MACOSX_BUNDLE"))
          {
!         std::string plistFile =
!           this->CurrentMakefile->GetCurrentOutputDirectory();
!         plistFile += "/Info.plist";
!         cmSourceFile* sf =
!           this->CurrentMakefile->GetOrCreateSource(plistFile.c_str(), true);
          cmtarget.AddSourceFile(sf);
          }
--- 2210,2215 ----
        if(cmtarget.GetPropertyAsBool("MACOSX_BUNDLE"))
          {
!         std::string plist = this->ComputeInfoPListLocation(cmtarget);
!         cmSourceFile* sf = mf->GetOrCreateSource(plist.c_str(), true);
          cmtarget.AddSourceFile(sf);
          }
***************
*** 2966,2967 ****
--- 2959,2972 ----
      }
  }
+ 
+ //----------------------------------------------------------------------------
+ std::string
+ cmGlobalXCodeGenerator::ComputeInfoPListLocation(cmTarget& target)
+ {
+   std::string plist = target.GetMakefile()->GetCurrentOutputDirectory();
+   plist += cmake::GetCMakeFilesDirectory();
+   plist += "/";
+   plist += target.GetName();
+   plist += ".dir/Info.plist";
+   return plist;
+ }

Index: cmGlobalXCodeGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -C 2 -d -r1.52 -r1.53
*** cmGlobalXCodeGenerator.h	14 Jan 2008 14:20:57 -0000	1.52
--- cmGlobalXCodeGenerator.h	3 Jul 2008 17:28:54 -0000	1.53
***************
*** 104,107 ****
--- 104,109 ----
                              cmTarget& cmtarget);
  
+   std::string ComputeInfoPListLocation(cmTarget& target);
+ 
    void AddCommandsToBuildPhase(cmXCodeObject* buildphase,
                                 cmTarget& target,



More information about the Cmake-commits mailing list