cmExportBuildAndroidMKGenerator.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmExportBuildAndroidMKGenerator_h
  11. #define cmExportBuildAndroidMKGenerator_h
  12. #include "cmExportBuildFileGenerator.h"
  13. #include "cmListFileCache.h"
  14. class cmExportSet;
  15. /** \class cmExportBuildAndroidMKGenerator
  16. * \brief Generate a file exporting targets from a build tree.
  17. *
  18. * cmExportBuildAndroidMKGenerator generates a file exporting targets from
  19. * a build tree. This exports the targets to the Android ndk build tool
  20. * makefile format for prebuilt libraries.
  21. *
  22. * This is used to implement the EXPORT() command.
  23. */
  24. class cmExportBuildAndroidMKGenerator : public cmExportBuildFileGenerator
  25. {
  26. public:
  27. cmExportBuildAndroidMKGenerator();
  28. // this is so cmExportInstallAndroidMKGenerator can share this
  29. // function as they are almost the same
  30. enum GenerateType
  31. {
  32. BUILD,
  33. INSTALL
  34. };
  35. static void GenerateInterfaceProperties(cmGeneratorTarget const* target,
  36. std::ostream& os,
  37. const ImportPropertyMap& properties,
  38. GenerateType type,
  39. std::string const& config);
  40. protected:
  41. // Implement virtual methods from the superclass.
  42. void GeneratePolicyHeaderCode(std::ostream&) CM_OVERRIDE {}
  43. void GeneratePolicyFooterCode(std::ostream&) CM_OVERRIDE {}
  44. void GenerateImportHeaderCode(std::ostream& os,
  45. const std::string& config = "") CM_OVERRIDE;
  46. void GenerateImportFooterCode(std::ostream& os) CM_OVERRIDE;
  47. void GenerateImportTargetCode(std::ostream& os,
  48. const cmGeneratorTarget* target) CM_OVERRIDE;
  49. void GenerateExpectedTargetsCode(
  50. std::ostream& os, const std::string& expectedTargets) CM_OVERRIDE;
  51. void GenerateImportPropertyCode(std::ostream& os, const std::string& config,
  52. cmGeneratorTarget const* target,
  53. ImportPropertyMap const& properties)
  54. CM_OVERRIDE;
  55. void GenerateMissingTargetsCheckCode(
  56. std::ostream& os,
  57. const std::vector<std::string>& missingTargets) CM_OVERRIDE;
  58. void GenerateInterfaceProperties(
  59. cmGeneratorTarget const* target, std::ostream& os,
  60. const ImportPropertyMap& properties) CM_OVERRIDE;
  61. };
  62. #endif