cmInstallExportGenerator.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. #ifndef cmInstallExportGenerator_h
  11. #define cmInstallExportGenerator_h
  12. #include "cmInstallGenerator.h"
  13. class cmExportInstallFileGenerator;
  14. class cmInstallFilesGenerator;
  15. class cmInstallTargetGenerator;
  16. class cmExportSet;
  17. class cmMakefile;
  18. /** \class cmInstallExportGenerator
  19. * \brief Generate rules for creating an export files.
  20. */
  21. class cmInstallExportGenerator: public cmInstallGenerator
  22. {
  23. public:
  24. cmInstallExportGenerator(cmExportSet* exportSet,
  25. const char* dest, const char* file_permissions,
  26. const std::vector<std::string>& configurations,
  27. const char* component,
  28. MessageLevel message,
  29. const char* filename, const char* name_space,
  30. bool exportOld, cmMakefile* mf);
  31. ~cmInstallExportGenerator();
  32. cmExportSet* GetExportSet() {return this->ExportSet;}
  33. cmMakefile* GetMakefile() const { return this->Makefile; }
  34. const std::string& GetNamespace() const { return this->Namespace; }
  35. protected:
  36. virtual void GenerateScript(std::ostream& os);
  37. virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent);
  38. virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
  39. void GenerateImportFile(cmExportSet const* exportSet);
  40. void GenerateImportFile(const char* config, cmExportSet const* exportSet);
  41. void ComputeTempDir();
  42. cmExportSet* ExportSet;
  43. std::string FilePermissions;
  44. std::string FileName;
  45. std::string Namespace;
  46. bool ExportOld;
  47. cmMakefile* Makefile;
  48. std::string TempDir;
  49. std::string MainImportFile;
  50. cmExportInstallFileGenerator* EFGen;
  51. };
  52. #endif