cmExportBuildAndroidMKGenerator.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. virtual void GeneratePolicyHeaderCode(std::ostream&) {}
  43. virtual void GeneratePolicyFooterCode(std::ostream&) {}
  44. virtual void GenerateImportHeaderCode(std::ostream& os,
  45. const std::string& config = "");
  46. virtual void GenerateImportFooterCode(std::ostream& os);
  47. virtual void GenerateImportTargetCode(std::ostream& os,
  48. const cmGeneratorTarget* target);
  49. virtual void GenerateExpectedTargetsCode(std::ostream& os,
  50. const std::string& expectedTargets);
  51. virtual void GenerateImportPropertyCode(std::ostream& os,
  52. const std::string& config,
  53. cmGeneratorTarget const* target,
  54. ImportPropertyMap const& properties);
  55. virtual void GenerateMissingTargetsCheckCode(
  56. std::ostream& os, const std::vector<std::string>& missingTargets);
  57. virtual void GenerateInterfaceProperties(
  58. cmGeneratorTarget const* target, std::ostream& os,
  59. const ImportPropertyMap& properties);
  60. };
  61. #endif