cmInstallDirectoryGenerator.cxx 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #include "cmInstallDirectoryGenerator.h"
  14. #include "cmTarget.h"
  15. //----------------------------------------------------------------------------
  16. cmInstallDirectoryGenerator
  17. ::cmInstallDirectoryGenerator(std::vector<std::string> const& dirs,
  18. const char* dest,
  19. const char* file_permissions,
  20. const char* dir_permissions,
  21. std::vector<std::string> const& configurations,
  22. const char* component,
  23. const char* literal_args):
  24. cmInstallGenerator(dest, configurations, component), Directories(dirs),
  25. FilePermissions(file_permissions), DirPermissions(dir_permissions),
  26. LiteralArguments(literal_args)
  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. bool not_optional = false;
  41. const char* no_properties = 0;
  42. const char* no_rename = 0;
  43. this->AddInstallRule(os, cmTarget::INSTALL_DIRECTORY,
  44. this->Directories,
  45. not_optional, no_properties,
  46. this->FilePermissions.c_str(),
  47. this->DirPermissions.c_str(),
  48. no_rename, this->LiteralArguments.c_str(),
  49. indent);
  50. }