summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index e46521b..e0d6b5d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1865,25 +1865,25 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
// VERSION -> current_version
target.GetTargetVersion(false, major, minor, patch);
- if(major == 0 && minor == 0 && patch == 0)
+ cmOStringStream v;
+
+ // Xcode always wants at least 1.0.0 or nothing
+ if(!(major == 0 && minor == 0 && patch == 0))
{
- // Xcode always wants at least 1.0.0
- major = 1;
+ v << major << "." << minor << "." << patch;
}
- cmOStringStream v;
- v << major << "." << minor << "." << patch;
buildSettings->AddAttribute("DYLIB_CURRENT_VERSION",
this->CreateString(v.str().c_str()));
// SOVERSION -> compatibility_version
target.GetTargetVersion(true, major, minor, patch);
- if(major == 0 && minor == 0 && patch == 0)
+ cmOStringStream vso;
+
+ // Xcode always wants at least 1.0.0 or nothing
+ if(!(major == 0 && minor == 0 && patch == 0))
{
- // Xcode always wants at least 1.0.0
- major = 1;
+ vso << major << "." << minor << "." << patch;
}
- cmOStringStream vso;
- vso << major << "." << minor << "." << patch;
buildSettings->AddAttribute("DYLIB_COMPATIBILITY_VERSION",
this->CreateString(vso.str().c_str()));
}