/src/CMake/Source/cmExportBuildAndroidMKGenerator.cxx
Line | Count | Source |
1 | | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
2 | | file LICENSE.rst or https://cmake.org/licensing for details. */ |
3 | | #include "cmExportBuildAndroidMKGenerator.h" |
4 | | |
5 | | #include <functional> |
6 | | #include <sstream> |
7 | | #include <vector> |
8 | | |
9 | | #include "cmGeneratorExpression.h" |
10 | | #include "cmGeneratorTarget.h" |
11 | | #include "cmStateTypes.h" |
12 | | #include "cmStringAlgorithms.h" |
13 | | #include "cmSystemTools.h" |
14 | | #include "cmTarget.h" |
15 | | |
16 | 0 | cmExportBuildAndroidMKGenerator::cmExportBuildAndroidMKGenerator() = default; Unexecuted instantiation: cmExportBuildAndroidMKGenerator::cmExportBuildAndroidMKGenerator() Unexecuted instantiation: cmExportBuildAndroidMKGenerator::cmExportBuildAndroidMKGenerator() |
17 | | |
18 | | bool cmExportBuildAndroidMKGenerator::GenerateMainFile(std::ostream& os) |
19 | 0 | { |
20 | 0 | if (!this->CollectExports([&](cmGeneratorTarget const*) {})) { |
21 | 0 | return false; |
22 | 0 | } |
23 | | |
24 | | // Create all the imported targets. |
25 | 0 | for (auto const& exp : this->Exports) { |
26 | 0 | cmGeneratorTarget* gte = exp.Target; |
27 | |
|
28 | 0 | this->GenerateImportTargetCode(os, gte, this->GetExportTargetType(gte)); |
29 | |
|
30 | 0 | gte->Target->AppendBuildInterfaceIncludes(); |
31 | |
|
32 | 0 | ImportPropertyMap properties; |
33 | 0 | if (!this->PopulateInterfaceProperties(gte, properties)) { |
34 | 0 | return false; |
35 | 0 | } |
36 | | |
37 | 0 | this->PopulateInterfaceLinkLibrariesProperty( |
38 | 0 | gte, cmGeneratorExpression::BuildInterface, properties); |
39 | |
|
40 | 0 | this->GenerateInterfaceProperties(gte, os, properties); |
41 | 0 | } |
42 | | |
43 | 0 | return true; |
44 | 0 | } |
45 | | |
46 | | void cmExportBuildAndroidMKGenerator::GenerateImportHeaderCode( |
47 | | std::ostream& os, std::string const&) |
48 | 0 | { |
49 | 0 | os << "LOCAL_PATH := $(call my-dir)\n\n"; |
50 | 0 | } |
51 | | |
52 | | void cmExportBuildAndroidMKGenerator::GenerateImportTargetCode( |
53 | | std::ostream& os, cmGeneratorTarget const* target, |
54 | | cmStateEnums::TargetType /*targetType*/) |
55 | 0 | { |
56 | 0 | std::string targetName = cmStrCat(this->Namespace, target->GetExportName()); |
57 | 0 | os << "include $(CLEAR_VARS)\n"; |
58 | 0 | os << "LOCAL_MODULE := "; |
59 | 0 | os << targetName << "\n"; |
60 | 0 | os << "LOCAL_SRC_FILES := "; |
61 | 0 | std::string const noConfig; // FIXME: What config to use here? |
62 | 0 | std::string path = |
63 | 0 | cmSystemTools::ConvertToOutputPath(target->GetFullPath(noConfig)); |
64 | 0 | os << path << "\n"; |
65 | 0 | } |