summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-11-23 20:12:26 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-11-23 20:12:49 (GMT)
commit2fad42832d41092dd21e63185d23fde3e44103a5 (patch)
tree16978f78ca78b65625c86c9c31d6b0922e54f5d6 /Source
parent5caaf1d6518fca74bc46de9cf5bfddc39be441e6 (diff)
parentcd6fb6309328a9c113f1fe3c2b842d4650c81980 (diff)
downloadCMake-2fad42832d41092dd21e63185d23fde3e44103a5.zip
CMake-2fad42832d41092dd21e63185d23fde3e44103a5.tar.gz
CMake-2fad42832d41092dd21e63185d23fde3e44103a5.tar.bz2
Merge topic 'aix-archive-shared-libraries-export' into release-3.31
cd6fb63093 AIX: Propagate AIX_SHARED_LIBRARY_ARCHIVE through exports Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !10027
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExportCMakeConfigGenerator.cxx6
-rw-r--r--Source/cmInstallImportedRuntimeArtifactsGenerator.cxx12
-rw-r--r--Source/cmTarget.cxx5
3 files changed, 18 insertions, 5 deletions
diff --git a/Source/cmExportCMakeConfigGenerator.cxx b/Source/cmExportCMakeConfigGenerator.cxx
index 4f4765c..e85d949 100644
--- a/Source/cmExportCMakeConfigGenerator.cxx
+++ b/Source/cmExportCMakeConfigGenerator.cxx
@@ -334,6 +334,12 @@ void cmExportCMakeConfigGenerator::GenerateImportTargetCode(
os << "set_property(TARGET " << targetName << " PROPERTY BUNDLE 1)\n";
}
+ // Mark the imported library if it is an AIX shared library archive.
+ if (target->IsArchivedAIXSharedLibrary()) {
+ os << "set_property(TARGET " << targetName
+ << " PROPERTY AIX_SHARED_LIBRARY_ARCHIVE 1)\n";
+ }
+
// generate DEPRECATION
if (target->IsDeprecated()) {
os << "set_property(TARGET " << targetName << " PROPERTY DEPRECATION "
diff --git a/Source/cmInstallImportedRuntimeArtifactsGenerator.cxx b/Source/cmInstallImportedRuntimeArtifactsGenerator.cxx
index 01980ac..79b18e5 100644
--- a/Source/cmInstallImportedRuntimeArtifactsGenerator.cxx
+++ b/Source/cmInstallImportedRuntimeArtifactsGenerator.cxx
@@ -107,11 +107,13 @@ void cmInstallImportedRuntimeArtifactsGenerator::GenerateScriptForConfig(
}
} else {
std::vector<std::string> files{ location };
- auto soName = this->Target->GetSOName(config);
- auto soNameFile =
- cmStrCat(this->Target->GetDirectory(config), '/', soName);
- if (!soName.empty() && soNameFile != location) {
- files.push_back(soNameFile);
+ if (!this->Target->IsArchivedAIXSharedLibrary()) {
+ auto soName = this->Target->GetSOName(config);
+ auto soNameFile =
+ cmStrCat(this->Target->GetDirectory(config), '/', soName);
+ if (!soName.empty() && soNameFile != location) {
+ files.push_back(soNameFile);
+ }
}
this->AddInstallRule(os, this->GetDestination(config),
cmInstallType_SHARED_LIBRARY, files,
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f220837..f1dcc76 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1087,6 +1087,11 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
}
}
+ // Imported targets must set AIX_SHARED_LIBRARY_ARCHIVE explicitly.
+ if (this->IsImported() && property == "AIX_SHARED_LIBRARY_ARCHIVE"_s) {
+ return;
+ }
+
// Replace everything after "CMAKE_"
defKey.replace(defKey.begin() + 6, defKey.end(), property);
if (cmValue value = mf->GetDefinition(defKey)) {