cmExportInstallAndroidMKGenerator.h 2.94 KB
Newer Older
1 2
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
3 4 5
#ifndef cmExportInstallAndroidMKGenerator_h
#define cmExportInstallAndroidMKGenerator_h

6
#include "cmConfigure.h" // IWYU pragma: keep
7 8 9 10 11 12 13

#include <iosfwd>
#include <set>
#include <string>
#include <vector>

#include "cmExportFileGenerator.h"
14
#include "cmExportInstallFileGenerator.h"
15
#include "cmStateTypes.h"
16

17
class cmGeneratorTarget;
18 19 20 21 22 23 24 25
class cmInstallExportGenerator;

/** \class cmExportInstallAndroidMKGenerator
 * \brief Generate a file exporting targets from an install tree.
 *
 * cmExportInstallAndroidMKGenerator generates files exporting targets from
 * install an installation tree.  The files are placed in a temporary
 * location for installation by cmInstallExportGenerator.  The file format
Luz Paz's avatar
Luz Paz committed
26
 * is for the ndk build system and is a makefile fragment specifying prebuilt
27 28 29 30 31 32 33 34 35 36 37 38 39
 * libraries to the ndk build system.
 *
 * This is used to implement the INSTALL(EXPORT_ANDROID_MK) command.
 */
class cmExportInstallAndroidMKGenerator : public cmExportInstallFileGenerator
{
public:
  /** Construct with the export installer that will install the
      files.  */
  cmExportInstallAndroidMKGenerator(cmInstallExportGenerator* iegen);

protected:
  // Implement virtual methods from the superclass.
40 41
  void GeneratePolicyHeaderCode(std::ostream&) override {}
  void GeneratePolicyFooterCode(std::ostream&) override {}
42
  void GenerateImportHeaderCode(std::ostream& os,
43 44
                                const std::string& config = "") override;
  void GenerateImportFooterCode(std::ostream& os) override;
45 46 47
  void GenerateImportTargetCode(
    std::ostream& os, cmGeneratorTarget const* target,
    cmStateEnums::TargetType /*targetType*/) override;
48
  void GenerateExpectedTargetsCode(
49 50 51 52 53
    std::ostream& os, const std::string& expectedTargets) override;
  void GenerateImportPropertyCode(
    std::ostream& os, const std::string& config,
    cmGeneratorTarget const* target,
    ImportPropertyMap const& properties) override;
54
  void GenerateMissingTargetsCheckCode(
55
    std::ostream& os, const std::vector<std::string>& missingTargets) override;
56
  void GenerateInterfaceProperties(
57
    cmGeneratorTarget const* target, std::ostream& os,
58 59 60
    const ImportPropertyMap& properties) override;
  void GenerateImportPrefix(std::ostream& os) override;
  void LoadConfigFiles(std::ostream&) override;
61
  void GenerateRequiredCMakeVersion(std::ostream& os,
62 63 64
                                    const char* versionString) override;
  void CleanupTemporaryVariables(std::ostream&) override;
  void GenerateImportedFileCheckLoop(std::ostream& os) override;
65
  void GenerateImportedFileChecksCode(
66 67
    std::ostream& os, cmGeneratorTarget* target,
    ImportPropertyMap const& properties,
68
    const std::set<std::string>& importedLocations) override;
69
  bool GenerateImportFileConfig(const std::string& config,
70
                                std::vector<std::string>&) override;
71 72 73
};

#endif