MCPcopy Create free account
hub / github.com/Kitware/CMake / GenerateImportHeaderCode

Method GenerateImportHeaderCode

Source/cmExportInstallAndroidMKGenerator.cxx:70–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void cmExportInstallAndroidMKGenerator::GenerateImportHeaderCode(
71 std::ostream& os, std::string const&)
72{
73 std::string installDir = this->IEGen->GetDestination();
74 os << "LOCAL_PATH := $(call my-dir)\n";
75 size_t numDotDot = cmSystemTools::CountChar(installDir.c_str(), '/');
76 numDotDot += installDir.empty() ? 0 : 1;
77 std::string path;
78 for (size_t n = 0; n < numDotDot; n++) {
79 path += "/..";
80 }
81 os << "_IMPORT_PREFIX := $(LOCAL_PATH)" << path << "\n\n";
82 for (std::unique_ptr<cmTargetExport> const& te :
83 this->IEGen->GetExportSet()->GetTargetExports()) {
84 // Collect import properties for this target.
85 if (te->Target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
86 continue;
87 }
88 std::string dest;
89 if (te->LibraryGenerator) {
90 dest = te->LibraryGenerator->GetDestination("");
91 }
92 if (te->ArchiveGenerator) {
93 dest = te->ArchiveGenerator->GetDestination("");
94 }
95 te->Target->Target->SetProperty("__dest", dest);
96 }
97}
98
99void cmExportInstallAndroidMKGenerator::GenerateImportTargetCode(
100 std::ostream& os, cmGeneratorTarget const* target,

Callers

nothing calls this directly

Calls 6

c_strMethod · 0.80
GetDestinationMethod · 0.45
emptyMethod · 0.45
GetExportSetMethod · 0.45
GetTypeMethod · 0.45
SetPropertyMethod · 0.45

Tested by

no test coverage detected