cmInstallExportGenerator.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 <cmConfigure.h>
  13. #include "cmInstallGenerator.h"
  14. #include "cmScriptGenerator.h"
  15. #include <iosfwd>
  16. #include <stddef.h>
  17. #include <string>
  18. #include <vector>
  19. class cmExportInstallFileGenerator;
  20. class cmExportSet;
  21. class cmLocalGenerator;
  22. /** \class cmInstallExportGenerator
  23. * \brief Generate rules for creating an export files.
  24. */
  25. class cmInstallExportGenerator : public cmInstallGenerator
  26. {
  27. public:
  28. cmInstallExportGenerator(cmExportSet* exportSet, const char* dest,
  29. const char* file_permissions,
  30. const std::vector<std::string>& configurations,
  31. const char* component, MessageLevel message,
  32. bool exclude_from_all, const char* filename,
  33. const char* name_space, bool exportOld,
  34. bool android);
  35. ~cmInstallExportGenerator() CM_OVERRIDE;
  36. cmExportSet* GetExportSet() { return this->ExportSet; }
  37. void Compute(cmLocalGenerator* lg) CM_OVERRIDE;
  38. cmLocalGenerator* GetLocalGenerator() const { return this->LocalGenerator; }
  39. const std::string& GetNamespace() const { return this->Namespace; }
  40. std::string const& GetDestination() const { return this->Destination; }
  41. protected:
  42. void GenerateScript(std::ostream& os) CM_OVERRIDE;
  43. void GenerateScriptConfigs(std::ostream& os,
  44. Indent const& indent) CM_OVERRIDE;
  45. void GenerateScriptActions(std::ostream& os,
  46. Indent const& indent) CM_OVERRIDE;
  47. void GenerateImportFile(cmExportSet const* exportSet);
  48. void GenerateImportFile(const char* config, cmExportSet const* exportSet);
  49. void ComputeTempDir();
  50. size_t GetMaxConfigLength() const;
  51. cmExportSet* ExportSet;
  52. std::string FilePermissions;
  53. std::string FileName;
  54. std::string Namespace;
  55. bool ExportOld;
  56. cmLocalGenerator* LocalGenerator;
  57. std::string TempDir;
  58. std::string MainImportFile;
  59. cmExportInstallFileGenerator* EFGen;
  60. };
  61. #endif