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. //----------------------------------------------------------------------------
  12. cmInstallFilesGenerator
  13. ::cmInstallFilesGenerator(cmMakefile* mf,
  14. 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. Makefile(mf),
  23. Files(files), Programs(programs),
  24. FilePermissions(file_permissions),
  25. Rename(rename), Optional(optional)
  26. {
  27. }
  28. //----------------------------------------------------------------------------
  29. cmInstallFilesGenerator
  30. ::~cmInstallFilesGenerator()
  31. {
  32. }
  33. //----------------------------------------------------------------------------
  34. void cmInstallFilesGenerator::GenerateScriptActions(std::ostream& os,
  35. Indent const& indent)
  36. {
  37. // Write code to install the files.
  38. const char* no_dir_permissions = 0;
  39. this->AddInstallRule(os,
  40. (this->Programs
  41. ? cmInstallType_PROGRAMS
  42. : cmInstallType_FILES),
  43. this->Files,
  44. this->Optional,
  45. this->FilePermissions.c_str(), no_dir_permissions,
  46. this->Rename.c_str(), 0, indent);
  47. }