cmInstallDirectoryGenerator.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmInstallDirectoryGenerator_h
  11. #define cmInstallDirectoryGenerator_h
  12. #include "cmInstallGenerator.h"
  13. /** \class cmInstallDirectoryGenerator
  14. * \brief Generate directory installation rules.
  15. */
  16. class cmInstallDirectoryGenerator: public cmInstallGenerator
  17. {
  18. public:
  19. cmInstallDirectoryGenerator(std::vector<std::string> const& dirs,
  20. const char* dest,
  21. const char* file_permissions,
  22. const char* dir_permissions,
  23. std::vector<std::string> const& configurations,
  24. const char* component,
  25. MessageLevel message,
  26. const char* literal_args,
  27. bool optional = false);
  28. virtual ~cmInstallDirectoryGenerator();
  29. void Compute(cmLocalGenerator* lg);
  30. std::string GetDestination(std::string const& config) const;
  31. protected:
  32. virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
  33. virtual void GenerateScriptForConfig(std::ostream& os,
  34. const std::string& config,
  35. Indent const& indent);
  36. void AddDirectoryInstallRule(std::ostream& os,
  37. const std::string& config,
  38. Indent const& indent);
  39. cmLocalGenerator* LocalGenerator;
  40. std::vector<std::string> Directories;
  41. std::string FilePermissions;
  42. std::string DirPermissions;
  43. std::string LiteralArguments;
  44. bool Optional;
  45. };
  46. #endif