summaryrefslogtreecommitdiffstats
path: root/Source/cmFileAPICodemodel.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-08 12:08:57 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-06-08 12:09:04 (GMT)
commitacb25d50d9d37e93cafcbbc4401e1b45029b6461 (patch)
tree078d3f511f584e4f924a9380f9539aa122a2263e /Source/cmFileAPICodemodel.cxx
parent3653dc60690e6fc33d9e7bf44186b82587cf21a7 (diff)
parent8d898cb3e10d6ad44bbe542b7b219a0b788b2a0d (diff)
downloadCMake-acb25d50d9d37e93cafcbbc4401e1b45029b6461.zip
CMake-acb25d50d9d37e93cafcbbc4401e1b45029b6461.tar.gz
CMake-acb25d50d9d37e93cafcbbc4401e1b45029b6461.tar.bz2
Merge topic 'install-with-runtime-dependencies'
8d898cb3e1 FileAPI: Add integration for runtime dependency installers 72f2448e82 Help: Add documentation for runtime dependency installation 0c3c6acaff Tests: Add tests for new options 4910132d8c install: Add RUNTIME_DEPENDENCY_SET mode bc8a4a06a4 install(IMPORTED_RUNTIME_ARTIFACTS): Add RUNTIME_DEPENDENCY_SET option 3e7d3c252a install(TARGETS): Add RUNTIME_DEPENDENCY_SET argument ed3633d88c install(TARGETS): Add RUNTIME_DEPENDENCIES option f2617cf8e6 Source: Add cmInstallRuntimeDependencySet ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6186
Diffstat (limited to 'Source/cmFileAPICodemodel.cxx')
-rw-r--r--Source/cmFileAPICodemodel.cxx28
1 files changed, 26 insertions, 2 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx
index efe1ab6..2d6745c 100644
--- a/Source/cmFileAPICodemodel.cxx
+++ b/Source/cmFileAPICodemodel.cxx
@@ -15,6 +15,7 @@
#include <utility>
#include <vector>
+#include <cm/string_view>
#include <cmext/algorithm>
#include <cm3p/json/value.h>
@@ -29,7 +30,10 @@
#include "cmInstallExportGenerator.h"
#include "cmInstallFilesGenerator.h"
#include "cmInstallGenerator.h"
+#include "cmInstallGetRuntimeDependenciesGenerator.h"
#include "cmInstallImportedRuntimeArtifactsGenerator.h"
+#include "cmInstallRuntimeDependencySet.h"
+#include "cmInstallRuntimeDependencySetGenerator.h"
#include "cmInstallScriptGenerator.h"
#include "cmInstallSubdirectoryGenerator.h"
#include "cmInstallTargetGenerator.h"
@@ -877,8 +881,10 @@ Json::Value DirectoryObject::DumpInstaller(cmInstallGenerator* gen)
assert(gen);
Json::Value installer = Json::objectValue;
- // Exclude subdirectory installers. They are implementation details.
- if (dynamic_cast<cmInstallSubdirectoryGenerator*>(gen)) {
+ // Exclude subdirectory installers and file(GET_RUNTIME_DEPENDENCIES)
+ // installers. They are implementation details.
+ if (dynamic_cast<cmInstallSubdirectoryGenerator*>(gen) ||
+ dynamic_cast<cmInstallGetRuntimeDependenciesGenerator*>(gen)) {
return installer;
}
@@ -1020,6 +1026,24 @@ Json::Value DirectoryObject::DumpInstaller(cmInstallGenerator* gen)
if (installImportedRuntimeArtifacts->GetOptional()) {
installer["isOptional"] = true;
}
+ } else if (auto* installRuntimeDependencySet =
+ dynamic_cast<cmInstallRuntimeDependencySetGenerator*>(gen)) {
+ installer["type"] = "runtimeDependencySet";
+ installer["destination"] =
+ installRuntimeDependencySet->GetDestination(this->Config);
+ std::string name(
+ installRuntimeDependencySet->GetRuntimeDependencySet()->GetName());
+ if (!name.empty()) {
+ installer["runtimeDependencySetName"] = name;
+ }
+ switch (installRuntimeDependencySet->GetDependencyType()) {
+ case cmInstallRuntimeDependencySetGenerator::DependencyType::Framework:
+ installer["runtimeDependencySetType"] = "framework";
+ break;
+ case cmInstallRuntimeDependencySetGenerator::DependencyType::Library:
+ installer["runtimeDependencySetType"] = "library";
+ break;
+ }
}
// Add fields common to all install generators.