cmInstallDirectoryGenerator.cxx 2.3 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), Directories(dirs),
  25. FilePermissions(file_permissions), DirPermissions(dir_permissions),
  26. Configurations(configurations), Component(component),
  27. LiteralArguments(literal_args)
  28. {
  29. }
  30. //----------------------------------------------------------------------------
  31. cmInstallDirectoryGenerator
  32. ::~cmInstallDirectoryGenerator()
  33. {
  34. }
  35. //----------------------------------------------------------------------------
  36. void cmInstallDirectoryGenerator::GenerateScript(std::ostream& os)
  37. {
  38. // Write code to install the directories.
  39. bool not_optional = false;
  40. const char* no_properties = 0;
  41. const char* no_rename = 0;
  42. this->AddInstallRule(os, this->Destination.c_str(),
  43. cmTarget::INSTALL_DIRECTORY,
  44. this->Directories,
  45. not_optional, no_properties,
  46. this->FilePermissions.c_str(),
  47. this->DirPermissions.c_str(),
  48. this->Configurations, this->Component.c_str(),
  49. no_rename, this->LiteralArguments.c_str());
  50. }