cmExportInstallAndroidMKGenerator.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt 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 <vector>
  8. #include "cmExportAndroidMKGenerator.h"
  9. #include "cmExportInstallFileGenerator.h"
  10. #include "cmStateTypes.h"
  11. class cmGeneratorTarget;
  12. class cmInstallExportGenerator;
  13. /** \class cmExportInstallAndroidMKGenerator
  14. * \brief Generate files exporting targets from an install tree.
  15. *
  16. * cmExportInstallAndroidMKGenerator generates files exporting targets from
  17. * an installation tree. The files are placed in a temporary location for
  18. * installation by cmInstallExportGenerator. The file format is for the ndk
  19. * build system and is a makefile fragment specifying prebuilt libraries to the
  20. * ndk build system.
  21. *
  22. * This is used to implement the INSTALL(EXPORT_ANDROID_MK) command.
  23. */
  24. class cmExportInstallAndroidMKGenerator
  25. : public cmExportAndroidMKGenerator
  26. , public cmExportInstallFileGenerator
  27. {
  28. public:
  29. /** Construct with the export installer that will install the
  30. files. */
  31. cmExportInstallAndroidMKGenerator(cmInstallExportGenerator* iegen);
  32. std::string GetConfigImportFileGlob() const override { return {}; }
  33. protected:
  34. GenerateType GetGenerateType() const override { return INSTALL; }
  35. // Implement virtual methods from the superclass.
  36. void ReportDuplicateTarget(std::string const& targetName) const;
  37. bool GenerateMainFile(std::ostream& os) override;
  38. void GenerateImportHeaderCode(std::ostream& os,
  39. std::string const& config = "") override;
  40. void GenerateImportTargetCode(
  41. std::ostream& os, cmGeneratorTarget const* target,
  42. cmStateEnums::TargetType /*targetType*/) override;
  43. void ComplainAboutMissingTarget(cmGeneratorTarget const* depender,
  44. cmGeneratorTarget const* dependee,
  45. std::vector<std::string> const& namespaces);
  46. void GenerateImportTargetsConfig(std::ostream& os, std::string const& config,
  47. std::string const& suffix) override
  48. {
  49. this->cmExportAndroidMKGenerator::GenerateImportTargetsConfig(os, config,
  50. suffix);
  51. }
  52. std::string GetCxxModulesDirectory() const override { return {}; }
  53. };