/src/CMake/Source/cmInstallFilesGenerator.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 "cmConfigure.h" // IWYU pragma: keep |
6 | | |
7 | | #include <iosfwd> |
8 | | #include <string> |
9 | | #include <vector> |
10 | | |
11 | | #include "cmInstallGenerator.h" |
12 | | |
13 | | class cmListFileBacktrace; |
14 | | class cmLocalGenerator; |
15 | | |
16 | | /** \class cmInstallFilesGenerator |
17 | | * \brief Generate file installation rules. |
18 | | */ |
19 | | class cmInstallFilesGenerator : public cmInstallGenerator |
20 | | { |
21 | | public: |
22 | | cmInstallFilesGenerator(std::vector<std::string> const& files, |
23 | | std::string const& dest, bool programs, |
24 | | std::string file_permissions, |
25 | | std::vector<std::string> const& configurations, |
26 | | std::string const& component, MessageLevel message, |
27 | | bool exclude_from_all, std::string rename, |
28 | | bool optional, cmListFileBacktrace backtrace); |
29 | | ~cmInstallFilesGenerator() override; |
30 | | |
31 | | bool Compute(cmLocalGenerator* lg) override; |
32 | | |
33 | | std::string GetDestination(std::string const& config) const; |
34 | | std::string GetRename(std::string const& config) const; |
35 | | std::vector<std::string> GetFiles(std::string const& config) const; |
36 | 0 | bool GetOptional() const { return this->Optional; } |
37 | | |
38 | | protected: |
39 | | void GenerateScriptActions(std::ostream& os, Indent indent) override; |
40 | | void GenerateScriptForConfig(std::ostream& os, std::string const& config, |
41 | | Indent indent) override; |
42 | | void AddFilesInstallRule(std::ostream& os, std::string const& config, |
43 | | Indent indent, |
44 | | std::vector<std::string> const& files); |
45 | | |
46 | | cmLocalGenerator* LocalGenerator = nullptr; |
47 | | std::vector<std::string> const Files; |
48 | | std::string const FilePermissions; |
49 | | std::string const Rename; |
50 | | bool const Programs; |
51 | | bool const Optional; |
52 | | }; |