2016-10-30 18:24:19 +01:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2008-10-12 18:41:06 +02:00
|
|
|
#ifndef cmInstallDirectoryGenerator_h
|
|
|
|
#define cmInstallDirectoryGenerator_h
|
|
|
|
|
|
|
|
#include "cmInstallGenerator.h"
|
2016-10-30 18:24:19 +01:00
|
|
|
#include "cmScriptGenerator.h"
|
|
|
|
|
2018-01-26 17:06:56 +01:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2017-07-20 19:35:53 +02:00
|
|
|
|
2016-10-30 18:24:19 +01:00
|
|
|
#include <iosfwd>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class cmLocalGenerator;
|
2008-10-12 18:41:06 +02:00
|
|
|
|
|
|
|
/** \class cmInstallDirectoryGenerator
|
|
|
|
* \brief Generate directory installation rules.
|
|
|
|
*/
|
2016-07-09 11:21:54 +02:00
|
|
|
class cmInstallDirectoryGenerator : public cmInstallGenerator
|
2008-10-12 18:41:06 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmInstallDirectoryGenerator(std::vector<std::string> const& dirs,
|
2016-07-09 11:21:54 +02:00
|
|
|
const char* dest, const char* file_permissions,
|
2008-10-12 18:41:06 +02:00
|
|
|
const char* dir_permissions,
|
|
|
|
std::vector<std::string> const& configurations,
|
2016-07-09 11:21:54 +02:00
|
|
|
const char* component, MessageLevel message,
|
|
|
|
bool exclude_from_all, const char* literal_args,
|
2009-10-04 10:30:41 +03:00
|
|
|
bool optional = false);
|
2018-01-26 17:06:56 +01:00
|
|
|
~cmInstallDirectoryGenerator() override;
|
2008-10-12 18:41:06 +02:00
|
|
|
|
2018-01-26 17:06:56 +01:00
|
|
|
void Compute(cmLocalGenerator* lg) override;
|
2015-11-17 17:22:37 +01:00
|
|
|
|
|
|
|
std::string GetDestination(std::string const& config) const;
|
|
|
|
|
2008-10-12 18:41:06 +02:00
|
|
|
protected:
|
2018-01-26 17:06:56 +01:00
|
|
|
void GenerateScriptActions(std::ostream& os, Indent indent) override;
|
2016-10-30 18:24:19 +01:00
|
|
|
void GenerateScriptForConfig(std::ostream& os, const std::string& config,
|
2018-01-26 17:06:56 +01:00
|
|
|
Indent indent) override;
|
2016-07-09 11:21:54 +02:00
|
|
|
void AddDirectoryInstallRule(std::ostream& os, const std::string& config,
|
2017-07-20 19:35:53 +02:00
|
|
|
Indent indent,
|
2016-03-13 13:35:51 +01:00
|
|
|
std::vector<std::string> const& dirs);
|
2015-11-17 17:22:37 +01:00
|
|
|
cmLocalGenerator* LocalGenerator;
|
2008-10-12 18:41:06 +02:00
|
|
|
std::vector<std::string> Directories;
|
|
|
|
std::string FilePermissions;
|
|
|
|
std::string DirPermissions;
|
|
|
|
std::string LiteralArguments;
|
2009-10-04 10:30:41 +03:00
|
|
|
bool Optional;
|
2008-10-12 18:41:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|