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