cmInstallDirectoryGenerator.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. bool exclude_from_all,
  27. const char* literal_args,
  28. bool optional = false);
  29. virtual ~cmInstallDirectoryGenerator();
  30. void Compute(cmLocalGenerator* lg);
  31. std::string GetDestination(std::string const& config) const;
  32. protected:
  33. virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
  34. virtual void GenerateScriptForConfig(std::ostream& os,
  35. const std::string& config,
  36. Indent const& indent);
  37. void AddDirectoryInstallRule(std::ostream& os,
  38. const std::string& config,
  39. Indent const& indent,
  40. std::vector<std::string> const& dirs);
  41. cmLocalGenerator* LocalGenerator;
  42. std::vector<std::string> Directories;
  43. std::string FilePermissions;
  44. std::string DirPermissions;
  45. std::string LiteralArguments;
  46. bool Optional;
  47. };
  48. #endif