cmInstallCommand.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmInstallCommand_h
  4. #define cmInstallCommand_h
  5. #include "cmCommand.h"
  6. /** \class cmInstallCommand
  7. * \brief Specifies where to install some files
  8. *
  9. * cmInstallCommand is a general-purpose interface command for
  10. * specifying install rules.
  11. */
  12. class cmInstallCommand : public cmCommand
  13. {
  14. public:
  15. /**
  16. * This is a virtual constructor for the command.
  17. */
  18. cmCommand* Clone() CM_OVERRIDE { return new cmInstallCommand; }
  19. /**
  20. * This is called when the command is first encountered in
  21. * the CMakeLists.txt file.
  22. */
  23. bool InitialPass(std::vector<std::string> const& args,
  24. cmExecutionStatus& status) CM_OVERRIDE;
  25. /**
  26. * The name of the command as specified in CMakeList.txt.
  27. */
  28. std::string GetName() const CM_OVERRIDE { return "install"; }
  29. cmTypeMacro(cmInstallCommand, cmCommand);
  30. private:
  31. bool HandleScriptMode(std::vector<std::string> const& args);
  32. bool HandleTargetsMode(std::vector<std::string> const& args);
  33. bool HandleFilesMode(std::vector<std::string> const& args);
  34. bool HandleDirectoryMode(std::vector<std::string> const& args);
  35. bool HandleExportMode(std::vector<std::string> const& args);
  36. bool HandleExportAndroidMKMode(std::vector<std::string> const& args);
  37. bool MakeFilesFullPath(const char* modeName,
  38. const std::vector<std::string>& relFiles,
  39. std::vector<std::string>& absFiles);
  40. bool CheckCMP0006(bool& failure);
  41. std::string DefaultComponentName;
  42. };
  43. #endif