[Cmake-commits] [cmake-commits] king committed cmGlobalXCodeGenerator.cxx 1.236 1.237

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Oct 26 10:05:50 EDT 2009


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

Modified Files:
	cmGlobalXCodeGenerator.cxx 
Log Message:
Fix Xcode dylib version default

The commit "Set version info for shared libs on OSX" taught the Xcode
generator to honor VERSION and SOVERSION properties.  However, it also
set version '1.0.0' as the default when no version property is set,
which is inconsistent with the Makefiles generator.  This commit fixes
the default to '0.0.0' for consistency.

See issue #9773.


Index: cmGlobalXCodeGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalXCodeGenerator.cxx,v
retrieving revision 1.236
retrieving revision 1.237
diff -C 2 -d -r1.236 -r1.237
*** cmGlobalXCodeGenerator.cxx	22 Oct 2009 14:57:44 -0000	1.236
--- cmGlobalXCodeGenerator.cxx	26 Oct 2009 14:05:46 -0000	1.237
***************
*** 1866,1876 ****
      // VERSION -> current_version
      target.GetTargetVersion(false, major, minor, patch);
!     if(major == 0 && minor == 0 && patch == 0)
        {
!       // Xcode always wants at least 1.0.0
!       major = 1;
        }
-     cmOStringStream v;
-     v << major << "." << minor << "." << patch;
      buildSettings->AddAttribute("DYLIB_CURRENT_VERSION",
                                  this->CreateString(v.str().c_str()));
--- 1866,1876 ----
      // VERSION -> current_version
      target.GetTargetVersion(false, major, minor, patch);
!     cmOStringStream v;
! 
!     // Xcode always wants at least 1.0.0 or nothing
!     if(!(major == 0 && minor == 0 && patch == 0))
        {
!       v << major << "." << minor << "." << patch;
        }
      buildSettings->AddAttribute("DYLIB_CURRENT_VERSION",
                                  this->CreateString(v.str().c_str()));
***************
*** 1878,1888 ****
      // SOVERSION -> compatibility_version
      target.GetTargetVersion(true, major, minor, patch);
!     if(major == 0 && minor == 0 && patch == 0)
        {
!       // Xcode always wants at least 1.0.0
!       major = 1;
        }
-     cmOStringStream vso;
-     vso << major << "." << minor << "." << patch;
      buildSettings->AddAttribute("DYLIB_COMPATIBILITY_VERSION",
                                  this->CreateString(vso.str().c_str()));
--- 1878,1888 ----
      // SOVERSION -> compatibility_version
      target.GetTargetVersion(true, major, minor, patch);
!     cmOStringStream vso;
! 
!     // Xcode always wants at least 1.0.0 or nothing
!     if(!(major == 0 && minor == 0 && patch == 0))
        {
!       vso << major << "." << minor << "." << patch;
        }
      buildSettings->AddAttribute("DYLIB_COMPATIBILITY_VERSION",
                                  this->CreateString(vso.str().c_str()));



More information about the Cmake-commits mailing list