cmInstallExportGenerator.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. const char* filename, const char* name_space,
  29. bool exportOld, cmMakefile* mf);
  30. ~cmInstallExportGenerator();
  31. cmExportSet* GetExportSet() {return this->ExportSet;}
  32. cmMakefile* GetMakefile() const { return this->Makefile; }
  33. const std::string& GetNamespace() const { return this->Namespace; }
  34. protected:
  35. virtual void GenerateScript(std::ostream& os);
  36. virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent);
  37. virtual void GenerateScriptActions(std::ostream& os, Indent const& indent);
  38. void GenerateImportFile(cmExportSet const* exportSet);
  39. void GenerateImportFile(const char* config, cmExportSet const* exportSet);
  40. void ComputeTempDir();
  41. cmExportSet* ExportSet;
  42. std::string FilePermissions;
  43. std::string FileName;
  44. std::string Namespace;
  45. bool ExportOld;
  46. cmMakefile* Makefile;
  47. std::string TempDir;
  48. std::string MainImportFile;
  49. cmExportInstallFileGenerator* EFGen;
  50. };
  51. #endif