Kyle Edwards | 9b47912 | 2021-06-17 17:01:28 -0400 | [diff] [blame] | 1 | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
| 2 | file Copyright.txt or https://cmake.org/licensing for details. */ |
| 3 | #pragma once |
| 4 | |
| 5 | #include <iosfwd> |
| 6 | #include <map> |
| 7 | #include <string> |
| 8 | #include <vector> |
| 9 | |
| 10 | #include "cmInstallGenerator.h" |
Kyle Edwards | 9b47912 | 2021-06-17 17:01:28 -0400 | [diff] [blame] | 11 | #include "cmScriptGenerator.h" |
| 12 | |
| 13 | class cmGeneratorTarget; |
| 14 | class cmFileSet; |
Brad King | 11cc728 | 2022-03-30 16:35:23 -0400 | [diff] [blame] | 15 | class cmListFileBacktrace; |
Kyle Edwards | 9b47912 | 2021-06-17 17:01:28 -0400 | [diff] [blame] | 16 | class cmLocalGenerator; |
| 17 | |
| 18 | class cmInstallFileSetGenerator : public cmInstallGenerator |
| 19 | { |
| 20 | public: |
| 21 | cmInstallFileSetGenerator(std::string targetName, cmFileSet* fileSet, |
| 22 | std::string const& dest, |
| 23 | std::string file_permissions, |
| 24 | std::vector<std::string> const& configurations, |
| 25 | std::string const& component, MessageLevel message, |
| 26 | bool exclude_from_all, bool optional, |
| 27 | cmListFileBacktrace backtrace); |
| 28 | ~cmInstallFileSetGenerator() override; |
| 29 | |
| 30 | bool Compute(cmLocalGenerator* lg) override; |
| 31 | |
| 32 | std::string GetDestination(std::string const& config) const; |
| 33 | std::string GetDestination() const { return this->Destination; } |
| 34 | bool GetOptional() const { return this->Optional; } |
| 35 | cmFileSet* GetFileSet() const { return this->FileSet; } |
| 36 | cmGeneratorTarget* GetTarget() const { return this->Target; } |
| 37 | |
| 38 | protected: |
| 39 | void GenerateScriptForConfig(std::ostream& os, const std::string& config, |
| 40 | Indent indent) override; |
| 41 | |
| 42 | private: |
| 43 | std::string TargetName; |
| 44 | cmLocalGenerator* LocalGenerator; |
| 45 | cmFileSet* const FileSet; |
| 46 | std::string const FilePermissions; |
| 47 | bool const Optional; |
| 48 | cmGeneratorTarget* Target; |
| 49 | |
| 50 | std::map<std::string, std::vector<std::string>> CalculateFilesPerDir( |
| 51 | const std::string& config) const; |
| 52 | }; |