summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2021-06-02 18:55:43 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2021-06-04 19:25:18 (GMT)
commit8d898cb3e10d6ad44bbe542b7b219a0b788b2a0d (patch)
treea51dcab0e25d6b932fe82450b3f660d682907993 /Source
parent72f2448e82d8b3e90fa733cb6c631298083ae06b (diff)
downloadCMake-8d898cb3e10d6ad44bbe542b7b219a0b788b2a0d.zip
CMake-8d898cb3e10d6ad44bbe542b7b219a0b788b2a0d.tar.gz
CMake-8d898cb3e10d6ad44bbe542b7b219a0b788b2a0d.tar.bz2
FileAPI: Add integration for runtime dependency installers
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFileAPICodemodel.cxx28
1 files changed, 26 insertions, 2 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx
index ff11f4a..2c15c25 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"
@@ -876,8 +880,10 @@ Json::Value DirectoryObject::DumpInstaller(cmInstallGenerator* 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;
}
@@ -1019,6 +1025,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.