cmInstallGenerator.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. #ifndef cmInstallGenerator_h
  14. #define cmInstallGenerator_h
  15. #include "cmStandardIncludes.h"
  16. class cmLocalGenerator;
  17. /** \class cmInstallGenerator
  18. * \brief Support class for generating install scripts.
  19. *
  20. */
  21. class cmInstallGenerator
  22. {
  23. public:
  24. cmInstallGenerator();
  25. cmInstallGenerator(const char* dest):Destination(dest?dest:"") {}
  26. virtual ~cmInstallGenerator();
  27. void Generate(std::ostream& os, const char* config,
  28. std::vector<std::string> const& configurationTypes);
  29. static void AddInstallRule(
  30. std::ostream& os, const char* dest, int type,
  31. std::vector<std::string> const& files,
  32. bool optional = false,
  33. const char* properties = 0,
  34. const char* permissions_file = 0,
  35. const char* permissions_dir = 0,
  36. std::vector<std::string> const& configurations
  37. = std::vector<std::string>(),
  38. const char* component = 0,
  39. const char* rename = 0,
  40. const char* literal_args = 0
  41. );
  42. const char* GetDestination() const {return this->Destination.c_str();}
  43. protected:
  44. virtual void GenerateScript(std::ostream& os)=0;
  45. const char* ConfigurationName;
  46. std::vector<std::string> const* ConfigurationTypes;
  47. std::string Destination;
  48. };
  49. #endif