cmInstallFilesGenerator.cxx 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 "cmInstallFilesGenerator.h"
  11. #include "cmTarget.h"
  12. //----------------------------------------------------------------------------
  13. cmInstallFilesGenerator
  14. ::cmInstallFilesGenerator(std::vector<std::string> const& files,
  15. const char* dest, bool programs,
  16. const char* file_permissions,
  17. std::vector<std::string> const& configurations,
  18. const char* component,
  19. const char* rename,
  20. bool optional):
  21. cmInstallGenerator(dest, configurations, component),
  22. Files(files), Programs(programs),
  23. FilePermissions(file_permissions),
  24. Rename(rename), Optional(optional)
  25. {
  26. }
  27. //----------------------------------------------------------------------------
  28. cmInstallFilesGenerator
  29. ::~cmInstallFilesGenerator()
  30. {
  31. }
  32. //----------------------------------------------------------------------------
  33. void cmInstallFilesGenerator::GenerateScriptActions(std::ostream& os,
  34. Indent const& indent)
  35. {
  36. // Write code to install the files.
  37. const char* no_dir_permissions = 0;
  38. this->AddInstallRule(os,
  39. (this->Programs
  40. ? cmTarget::INSTALL_PROGRAMS
  41. : cmTarget::INSTALL_FILES),
  42. this->Files,
  43. this->Optional,
  44. this->FilePermissions.c_str(), no_dir_permissions,
  45. this->Rename.c_str(), 0, indent);
  46. }