cmExportSet.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 cmExportSet_h
  11. #define cmExportSet_h
  12. #include <cmConfigure.h> // IWYU pragma: keep
  13. #include <string>
  14. #include <vector>
  15. class cmInstallExportGenerator;
  16. class cmLocalGenerator;
  17. class cmTargetExport;
  18. /// A set of targets that were installed with the same EXPORT parameter.
  19. class cmExportSet
  20. {
  21. public:
  22. /// Construct an empty export set named \a name
  23. cmExportSet(const std::string& name)
  24. : Name(name)
  25. {
  26. }
  27. /// Destructor
  28. ~cmExportSet();
  29. void Compute(cmLocalGenerator* lg);
  30. void AddTargetExport(cmTargetExport* tgt);
  31. void AddInstallation(cmInstallExportGenerator const* installation);
  32. std::string const& GetName() const { return this->Name; }
  33. std::vector<cmTargetExport*> const* GetTargetExports() const
  34. {
  35. return &this->TargetExports;
  36. }
  37. std::vector<cmInstallExportGenerator const*> const* GetInstallations() const
  38. {
  39. return &this->Installations;
  40. }
  41. private:
  42. std::vector<cmTargetExport*> TargetExports;
  43. std::string Name;
  44. std::vector<cmInstallExportGenerator const*> Installations;
  45. };
  46. #endif