diff options
author | Isuru Fernando <isuruf@gmail.com> | 2020-01-24 16:32:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-24 19:13:41 (GMT) |
commit | 4a62e3d97c3ae907d9c43d139ff5bef55ef356aa (patch) | |
tree | 77ec7a313d4394a5416bde806ac0df8cab83b73b /Source/cmCommonTargetGenerator.cxx | |
parent | f45b2c48129ce302d100b0965374bcaacbb74219 (diff) | |
download | CMake-4a62e3d97c3ae907d9c43d139ff5bef55ef356aa.zip CMake-4a62e3d97c3ae907d9c43d139ff5bef55ef356aa.tar.gz CMake-4a62e3d97c3ae907d9c43d139ff5bef55ef356aa.tar.bz2 |
macOS: Add OSX_COMPATIBILITY_VERSION and OSX_CURRENT_VERSION properties
Fixes: #17652
Diffstat (limited to 'Source/cmCommonTargetGenerator.cxx')
-rw-r--r-- | Source/cmCommonTargetGenerator.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 9106e70..b8d8b96 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -233,7 +233,10 @@ void cmCommonTargetGenerator::AppendOSXVerFlag(std::string& flags, int major; int minor; int patch; - this->GeneratorTarget->GetTargetVersion(so, major, minor, patch); + std::string prop = cmStrCat("OSX_", name, "_VERSION"); + std::string fallback_prop = so ? "SOVERSION" : "VERSION"; + this->GeneratorTarget->GetTargetVersionFallback(prop, fallback_prop, major, + minor, patch); if (major > 0 || minor > 0 || patch > 0) { // Append the flag since a non-zero version is specified. std::ostringstream vflag; |