2016-09-27 15:01:08 -04:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2006-02-10 13:54:36 -05:00
|
|
|
#ifndef cmInstallCommand_h
|
|
|
|
#define cmInstallCommand_h
|
|
|
|
|
2017-08-25 20:39:02 +02:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2017-04-11 21:42:35 +02:00
|
|
|
|
2016-10-25 20:35:04 +02:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2019-07-04 18:14:22 +02:00
|
|
|
#include "cm_memory.hxx"
|
|
|
|
|
2006-02-10 13:54:36 -05:00
|
|
|
#include "cmCommand.h"
|
|
|
|
|
2016-10-25 20:35:04 +02:00
|
|
|
class cmExecutionStatus;
|
2018-11-02 12:42:41 -04:00
|
|
|
class cmInstallCommandArguments;
|
2016-10-25 20:35:04 +02:00
|
|
|
|
2006-02-10 13:54:36 -05:00
|
|
|
/** \class cmInstallCommand
|
|
|
|
* \brief Specifies where to install some files
|
|
|
|
*
|
|
|
|
* cmInstallCommand is a general-purpose interface command for
|
|
|
|
* specifying install rules.
|
|
|
|
*/
|
|
|
|
class cmInstallCommand : public cmCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* This is a virtual constructor for the command.
|
|
|
|
*/
|
2019-07-04 18:14:22 +02:00
|
|
|
std::unique_ptr<cmCommand> Clone() override
|
|
|
|
{
|
|
|
|
return cm::make_unique<cmInstallCommand>();
|
|
|
|
}
|
2006-02-10 13:54:36 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This is called when the command is first encountered in
|
|
|
|
* the CMakeLists.txt file.
|
|
|
|
*/
|
2016-06-27 21:25:27 +02:00
|
|
|
bool InitialPass(std::vector<std::string> const& args,
|
2017-09-15 09:56:26 -04:00
|
|
|
cmExecutionStatus& status) override;
|
2006-02-10 13:54:36 -05:00
|
|
|
|
2006-02-19 15:25:27 -05:00
|
|
|
private:
|
|
|
|
bool HandleScriptMode(std::vector<std::string> const& args);
|
|
|
|
bool HandleTargetsMode(std::vector<std::string> const& args);
|
2006-02-19 18:47:13 -05:00
|
|
|
bool HandleFilesMode(std::vector<std::string> const& args);
|
2006-08-17 14:48:54 -04:00
|
|
|
bool HandleDirectoryMode(std::vector<std::string> const& args);
|
2007-06-19 13:10:21 -04:00
|
|
|
bool HandleExportMode(std::vector<std::string> const& args);
|
2016-07-12 13:26:55 -04:00
|
|
|
bool HandleExportAndroidMKMode(std::vector<std::string> const& args);
|
2012-05-13 15:34:30 +02:00
|
|
|
bool MakeFilesFullPath(const char* modeName,
|
2007-08-27 16:04:57 -04:00
|
|
|
const std::vector<std::string>& relFiles,
|
|
|
|
std::vector<std::string>& absFiles);
|
2008-04-14 17:53:11 -04:00
|
|
|
bool CheckCMP0006(bool& failure);
|
2012-05-13 15:44:37 +02:00
|
|
|
|
2018-11-02 12:42:41 -04:00
|
|
|
std::string GetDestination(const cmInstallCommandArguments* args,
|
|
|
|
const std::string& varName,
|
|
|
|
const std::string& guess);
|
|
|
|
std::string GetRuntimeDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetSbinDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetArchiveDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetLibraryDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetIncludeDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetSysconfDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetSharedStateDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetLocalStateDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetRunStateDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetDataRootDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetDataDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetInfoDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetLocaleDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetManDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetDocDestination(const cmInstallCommandArguments* args);
|
|
|
|
std::string GetDestinationForType(const cmInstallCommandArguments* args,
|
|
|
|
const std::string& type);
|
|
|
|
|
2012-05-13 15:44:37 +02:00
|
|
|
std::string DefaultComponentName;
|
2006-02-10 13:54:36 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|