Merge topic 'install-namelink-no-rpath'

9c14f14848 install(TARGETS): Do not apply installation tweaks to NAMELINK files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8370
This commit is contained in:
Brad King
2023-03-29 13:15:49 +00:00
committed by Kitware Robot
3 changed files with 30 additions and 4 deletions

View File

@@ -529,7 +529,7 @@ void cmInstallTargetGenerator::AddInstallNamePatchRule(
std::ostream& os, Indent indent, const std::string& config,
std::string const& toDestDirPath)
{
if (this->ImportLibrary ||
if (this->ImportLibrary || this->NamelinkMode == NamelinkModeOnly ||
!(this->Target->GetType() == cmStateEnums::SHARED_LIBRARY ||
this->Target->GetType() == cmStateEnums::MODULE_LIBRARY ||
this->Target->GetType() == cmStateEnums::EXECUTABLE)) {
@@ -626,7 +626,8 @@ void cmInstallTargetGenerator::AddRPathCheckRule(
std::string const& toDestDirPath)
{
// Skip the chrpath if the target does not need it.
if (this->ImportLibrary || !this->Target->IsChrpathUsed(config)) {
if (this->ImportLibrary || this->NamelinkMode == NamelinkModeOnly ||
!this->Target->IsChrpathUsed(config)) {
return;
}
// Skip if on Apple
@@ -677,7 +678,8 @@ void cmInstallTargetGenerator::AddChrpathPatchRule(
std::string const& toDestDirPath)
{
// Skip the chrpath if the target does not need it.
if (this->ImportLibrary || !this->Target->IsChrpathUsed(config)) {
if (this->ImportLibrary || this->NamelinkMode == NamelinkModeOnly ||
!this->Target->IsChrpathUsed(config)) {
return;
}
@@ -816,7 +818,7 @@ void cmInstallTargetGenerator::AddStripRule(std::ostream& os, Indent indent,
// don't strip static and import libraries, because it removes the only
// symbol table they have so you can't link to them anymore
if (this->Target->GetType() == cmStateEnums::STATIC_LIBRARY ||
this->ImportLibrary) {
this->ImportLibrary || this->NamelinkMode == NamelinkModeOnly) {
return;
}