/src/CMake/Source/cmInstallFileSetGenerator.h
Line | Count | Source |
1 | | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
2 | | file LICENSE.rst 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" |
11 | | |
12 | | class cmGeneratorTarget; |
13 | | class cmFileSet; |
14 | | class cmListFileBacktrace; |
15 | | class cmLocalGenerator; |
16 | | |
17 | | struct cmFileSetDestinations |
18 | | { |
19 | | std::string Headers; |
20 | | std::string CXXModules; |
21 | | }; |
22 | | |
23 | | class cmInstallFileSetGenerator : public cmInstallGenerator |
24 | | { |
25 | | public: |
26 | | cmInstallFileSetGenerator(std::string targetName, std::string fileSetName, |
27 | | cmFileSetDestinations dests, |
28 | | std::string file_permissions, |
29 | | std::vector<std::string> const& configurations, |
30 | | std::string const& component, MessageLevel message, |
31 | | bool exclude_from_all, bool optional, |
32 | | cmListFileBacktrace backtrace); |
33 | | ~cmInstallFileSetGenerator() override; |
34 | | |
35 | | bool Compute(cmLocalGenerator* lg) override; |
36 | | |
37 | | std::string GetDestination(std::string const& config) const; |
38 | 0 | std::string GetDestination() const { return this->Destination; } |
39 | 0 | bool GetOptional() const { return this->Optional; } |
40 | 0 | std::string GetFileSetName() const { return this->FileSetName; } |
41 | 0 | cmFileSet const* GetFileSet() const { return this->FileSet; }; |
42 | 0 | cmGeneratorTarget* GetTarget() const { return this->Target; } |
43 | | |
44 | | protected: |
45 | | void GenerateScriptForConfig(std::ostream& os, std::string const& config, |
46 | | Indent indent) override; |
47 | | |
48 | | private: |
49 | | std::string TargetName; |
50 | | cmLocalGenerator* LocalGenerator; |
51 | | cmFileSet const* FileSet; |
52 | | std::string const FileSetName; |
53 | | std::string const FilePermissions; |
54 | | cmFileSetDestinations FileSetDestinations; |
55 | | bool const Optional; |
56 | | cmGeneratorTarget* Target; |
57 | | |
58 | | std::map<std::string, std::vector<std::string>> CalculateFilesPerDir( |
59 | | std::string const& config) const; |
60 | | }; |