cmExportSet.h 1.3 KB

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