diff options
author | Brad King <brad.king@kitware.com> | 2019-01-29 17:53:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-29 17:53:30 (GMT) |
commit | 17b1d7995efb14e14b15926dbb5fc530b71ed149 (patch) | |
tree | 7cf3ad0ee10234edaf52bd5399670c043ad7a93d /Source | |
parent | a57fcfa3e0989a74d1e1c6c24132e285cdace2b1 (diff) | |
parent | d9dd68cb60ed09e32cbda8bbd3e31c86a8778e66 (diff) | |
download | CMake-17b1d7995efb14e14b15926dbb5fc530b71ed149.zip CMake-17b1d7995efb14e14b15926dbb5fc530b71ed149.tar.gz CMake-17b1d7995efb14e14b15926dbb5fc530b71ed149.tar.bz2 |
Merge branch 'backport-restore-install-late-framework' into release-3.13
Merge-request: !2878
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmInstallTargetGenerator.cxx | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 8b8f79b..bf0217a 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -210,8 +210,29 @@ void cmInstallTargetGenerator::GenerateScriptForConfig( // An import library looks like a static library. type = cmInstallType_STATIC_LIBRARY; } else if (this->Target->IsFrameworkOnApple()) { - // There is a bug in cmInstallCommand if this fails. - assert(this->NamelinkMode == NamelinkModeNone); + // FIXME: In principle we should be able to + // assert(this->NamelinkMode == NamelinkModeNone); + // but since the current install() command implementation checks + // the FRAMEWORK property immediately instead of delaying until + // generate time, it is possible for project code to set the + // property after calling install(). In such a case, the install() + // command will use the LIBRARY code path and create two install + // generators, one for the namelink component (NamelinkModeOnly) + // and one for the primary artifact component (NamelinkModeSkip). + // Historically this was not diagnosed and resulted in silent + // installation of a framework to the LIBRARY destination. + // Retain that behavior. + switch (this->NamelinkMode) { + case NamelinkModeNone: + // Normal case. + break; + case NamelinkModeOnly: + // Assume the NamelinkModeSkip instance will install. + return; + case NamelinkModeSkip: { + // Proceed to install in the LIBRARY destination for compatibility. + } break; + } // Install the whole framework directory. type = cmInstallType_DIRECTORY; |