cmExportBuildPackageInfoGenerator.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file LICENSE.rst or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <iosfwd>
  6. #include <string>
  7. #include "cmExportBuildFileGenerator.h"
  8. #include "cmExportPackageInfoGenerator.h"
  9. namespace Json {
  10. class Value;
  11. }
  12. class cmGeneratorTarget;
  13. class cmPackageInfoArguments;
  14. /** \class cmExportBuildPackageInfoGenerator
  15. * \brief Generate a file exporting targets from a build tree.
  16. *
  17. * cmExportBuildCMakeConfigGenerator generates a file exporting targets from
  18. * a build tree. This exports the targets to the Common Package Specification
  19. * (https://cps-org.github.io/cps/).
  20. *
  21. * This is used to implement the export() command.
  22. */
  23. class cmExportBuildPackageInfoGenerator
  24. : public cmExportBuildFileGenerator
  25. , public cmExportPackageInfoGenerator
  26. {
  27. public:
  28. cmExportBuildPackageInfoGenerator(cmPackageInfoArguments arguments);
  29. protected:
  30. // Implement virtual methods from the superclass.
  31. bool GenerateMainFile(std::ostream& os) override;
  32. void GenerateImportTargetsConfig(std::ostream&, std::string const&,
  33. std::string const&) override
  34. {
  35. }
  36. void GenerateInterfacePropertiesConfig(Json::Value& configurations,
  37. cmGeneratorTarget* target,
  38. std::string const& config);
  39. std::string GetCxxModulesDirectory() const override;
  40. // TODO: Generate C++ module info in a not-CMake-specific format.
  41. };