diff options
| author | atkawa7 <atkawa7@yahoo.com> | 2020-04-06 23:36:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-06 14:36:17 -0700 |
| commit | 52b5dfd2efbc576a3073fe335e7694f5d4d4c143 (patch) | |
| tree | 086e21106b477cc11fcba5f7c7025ab162eff688 /toolsrc/include | |
| parent | 6283a51112ed7bb1a3da46d9f181c075118a836e (diff) | |
| download | vcpkg-52b5dfd2efbc576a3073fe335e7694f5d4d4c143.tar.gz vcpkg-52b5dfd2efbc576a3073fe335e7694f5d4d4c143.zip | |
Android Support: Exporting to Android Archive (AAR) (#10271)
* added android triplets
* added android support to vcpkg
* added export directories to git ignore
* fix libraries naming
* added vckpg sources to visual studio project files
* rename file location
* issue with std::string fs:path copy initialization
* format path on VStudio
* fix checks format cannot work on fs::path
* support header only libraries
* support using architecture instead of triplets
* added prefab support
* added debug logs and prefab debug flag
* added support for empty packages i.e openssl
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/export.prefab.h | 82 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/triplet.h | 5 | ||||
| -rw-r--r-- | toolsrc/include/vcpkg/vcpkgpaths.h | 2 |
3 files changed, 89 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg/export.prefab.h b/toolsrc/include/vcpkg/export.prefab.h new file mode 100644 index 000000000..56a5ba371 --- /dev/null +++ b/toolsrc/include/vcpkg/export.prefab.h @@ -0,0 +1,82 @@ +#pragma once + +#include <vcpkg/base/system.h> +#include <vcpkg/dependencies.h> +#include <vcpkg/vcpkgpaths.h> + + +#include <vector> + +namespace vcpkg::Export::Prefab +{ + constexpr int kFragmentSize = 3; + + struct Options + { + Optional<std::string> maybe_group_id; + Optional<std::string> maybe_artifact_id; + Optional<std::string> maybe_version; + Optional<std::string> maybe_min_sdk; + Optional<std::string> maybe_target_sdk; + bool enable_maven; + bool enable_debug; + }; + struct NdkVersion + { + NdkVersion(int _major, int _minor, int _patch) : m_major{_major}, + m_minor{_minor}, + m_patch{_patch}{ + } + int major() { return this->m_major; } + int minor() { return this->m_minor; } + int patch() { return this->m_patch; } + std::string to_string(); + void to_string(std::string& out); + + private: + int m_major; + int m_minor; + int m_patch; + }; + + struct ABIMetadata + { + std::string abi; + int api; + int ndk; + std::string stl; + std::string to_string(); + }; + + struct PlatformModuleMetadata + { + std::vector<std::string> export_libraries; + std::string library_name; + std::string to_json(); + }; + + struct ModuleMetadata + { + std::vector<std::string> export_libraries; + std::string library_name; + PlatformModuleMetadata android; + std::string to_json(); + }; + + struct PackageMetadata + { + std::string name; + int schema; + std::vector<std::string> dependencies; + std::string version; + std::string to_json(); + }; + + + + void do_export(const std::vector<Dependencies::ExportPlanAction>& export_plan, + const VcpkgPaths& paths, + const Options& prefab_options, const Triplet& triplet); + Optional<std::string> find_ndk_version(const std::string &content); + Optional<NdkVersion> to_version(const std::string &version); +} diff --git a/toolsrc/include/vcpkg/triplet.h b/toolsrc/include/vcpkg/triplet.h index d836dd230..92ea10175 100644 --- a/toolsrc/include/vcpkg/triplet.h +++ b/toolsrc/include/vcpkg/triplet.h @@ -23,6 +23,11 @@ namespace vcpkg static const Triplet X64_UWP; static const Triplet ARM_UWP; static const Triplet ARM64_UWP; + + static const Triplet ARM_ANDROID; + static const Triplet ARM64_ANDROID; + static const Triplet X86_ANDROID; + static const Triplet X64_ANDROID; const std::string& canonical_name() const; const std::string& to_string() const; diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 63d19af2c..31d8374f1 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -14,6 +14,8 @@ namespace vcpkg namespace Tools { static const std::string SEVEN_ZIP = "7zip"; + static const std::string SEVEN_ZIP_ALT = "7z"; + static const std::string MAVEN = "mvn"; static const std::string CMAKE = "cmake"; static const std::string GIT = "git"; static const std::string NINJA = "ninja"; |
