cmExportBuildAndroidMKGenerator.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 cmExportBuildAndroidMKGenerator_h
  4. #define cmExportBuildAndroidMKGenerator_h
  5. #include <cmConfigure.h>
  6. #include <iosfwd>
  7. #include <string>
  8. #include <vector>
  9. #include "cmExportBuildFileGenerator.h"
  10. #include "cmExportFileGenerator.h"
  11. class cmGeneratorTarget;
  12. /** \class cmExportBuildAndroidMKGenerator
  13. * \brief Generate a file exporting targets from a build tree.
  14. *
  15. * cmExportBuildAndroidMKGenerator generates a file exporting targets from
  16. * a build tree. This exports the targets to the Android ndk build tool
  17. * makefile format for prebuilt libraries.
  18. *
  19. * This is used to implement the EXPORT() command.
  20. */
  21. class cmExportBuildAndroidMKGenerator : public cmExportBuildFileGenerator
  22. {
  23. public:
  24. cmExportBuildAndroidMKGenerator();
  25. // this is so cmExportInstallAndroidMKGenerator can share this
  26. // function as they are almost the same
  27. enum GenerateType
  28. {
  29. BUILD,
  30. INSTALL
  31. };
  32. static void GenerateInterfaceProperties(cmGeneratorTarget const* target,
  33. std::ostream& os,
  34. const ImportPropertyMap& properties,
  35. GenerateType type,
  36. std::string const& config);
  37. protected:
  38. // Implement virtual methods from the superclass.
  39. void GeneratePolicyHeaderCode(std::ostream&) CM_OVERRIDE {}
  40. void GeneratePolicyFooterCode(std::ostream&) CM_OVERRIDE {}
  41. void GenerateImportHeaderCode(std::ostream& os,
  42. const std::string& config = "") CM_OVERRIDE;
  43. void GenerateImportFooterCode(std::ostream& os) CM_OVERRIDE;
  44. void GenerateImportTargetCode(std::ostream& os,
  45. const cmGeneratorTarget* target) CM_OVERRIDE;
  46. void GenerateExpectedTargetsCode(
  47. std::ostream& os, const std::string& expectedTargets) CM_OVERRIDE;
  48. void GenerateImportPropertyCode(std::ostream& os, const std::string& config,
  49. cmGeneratorTarget const* target,
  50. ImportPropertyMap const& properties)
  51. CM_OVERRIDE;
  52. void GenerateMissingTargetsCheckCode(
  53. std::ostream& os,
  54. const std::vector<std::string>& missingTargets) CM_OVERRIDE;
  55. void GenerateInterfaceProperties(
  56. cmGeneratorTarget const* target, std::ostream& os,
  57. const ImportPropertyMap& properties) CM_OVERRIDE;
  58. };
  59. #endif