cmExportSet.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmExportSet_h
  4. #define cmExportSet_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. class cmInstallExportGenerator;
  9. class cmLocalGenerator;
  10. class cmTargetExport;
  11. /// A set of targets that were installed with the same EXPORT parameter.
  12. class cmExportSet
  13. {
  14. public:
  15. /// Construct an empty export set named \a name
  16. cmExportSet(const std::string& name)
  17. : Name(name)
  18. {
  19. }
  20. /// Destructor
  21. ~cmExportSet();
  22. void Compute(cmLocalGenerator* lg);
  23. void AddTargetExport(cmTargetExport* tgt);
  24. void AddInstallation(cmInstallExportGenerator const* installation);
  25. std::string const& GetName() const { return this->Name; }
  26. std::vector<cmTargetExport*> const* GetTargetExports() const
  27. {
  28. return &this->TargetExports;
  29. }
  30. std::vector<cmInstallExportGenerator const*> const* GetInstallations() const
  31. {
  32. return &this->Installations;
  33. }
  34. private:
  35. std::vector<cmTargetExport*> TargetExports;
  36. std::string Name;
  37. std::vector<cmInstallExportGenerator const*> Installations;
  38. };
  39. #endif