cmExportBuildAndroidMKGenerator.h 2.4 KB

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