cmInstallDirectoryGenerator.cxx 2.2 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. #include "cmInstallDirectoryGenerator.h"
  11. #include "cmTarget.h"
  12. //----------------------------------------------------------------------------
  13. cmInstallDirectoryGenerator
  14. ::cmInstallDirectoryGenerator(std::vector<std::string> const& dirs,
  15. const char* dest,
  16. const char* file_permissions,
  17. const char* dir_permissions,
  18. std::vector<std::string> const& configurations,
  19. const char* component,
  20. MessageLevel message,
  21. const char* literal_args,
  22. bool optional):
  23. cmInstallGenerator(dest, configurations, component, message),
  24. Directories(dirs),
  25. FilePermissions(file_permissions), DirPermissions(dir_permissions),
  26. LiteralArguments(literal_args), Optional(optional)
  27. {
  28. }
  29. //----------------------------------------------------------------------------
  30. cmInstallDirectoryGenerator
  31. ::~cmInstallDirectoryGenerator()
  32. {
  33. }
  34. //----------------------------------------------------------------------------
  35. void
  36. cmInstallDirectoryGenerator::GenerateScriptActions(std::ostream& os,
  37. Indent const& indent)
  38. {
  39. // Write code to install the directories.
  40. const char* no_rename = 0;
  41. this->AddInstallRule(os, cmInstallType_DIRECTORY,
  42. this->Directories,
  43. this->Optional,
  44. this->FilePermissions.c_str(),
  45. this->DirPermissions.c_str(),
  46. no_rename, this->LiteralArguments.c_str(),
  47. indent);
  48. }