aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include/VcpkgPaths.h
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-03 16:29:11 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-04 16:44:46 -0700
commit3f76b9e53d48e34960bb5947bbbb880ac806281b (patch)
treee9ecddfe9b170f105e3ba58e7137f8ffa845fc13 /toolsrc/include/VcpkgPaths.h
parent402552ef934d30c923e633daadc59ff853115df2 (diff)
downloadvcpkg-3f76b9e53d48e34960bb5947bbbb880ac806281b.tar.gz
vcpkg-3f76b9e53d48e34960bb5947bbbb880ac806281b.zip
vcpkg_paths -> VcpkgPaths
Diffstat (limited to 'toolsrc/include/VcpkgPaths.h')
-rw-r--r--toolsrc/include/VcpkgPaths.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/toolsrc/include/VcpkgPaths.h b/toolsrc/include/VcpkgPaths.h
new file mode 100644
index 000000000..880b33b98
--- /dev/null
+++ b/toolsrc/include/VcpkgPaths.h
@@ -0,0 +1,58 @@
+#pragma once
+#include "filesystem_fs.h"
+#include "vcpkg_expected.h"
+#include "PackageSpec.h"
+#include "BinaryParagraph.h"
+#include "Lazy.h"
+
+namespace vcpkg
+{
+ struct Toolset
+ {
+ fs::path dumpbin;
+ fs::path vcvarsall;
+ CWStringView version;
+ };
+
+ struct VcpkgPaths
+ {
+ static Expected<VcpkgPaths> create(const fs::path& vcpkg_root_dir);
+
+ fs::path package_dir(const PackageSpec& spec) const;
+ fs::path port_dir(const PackageSpec& spec) const;
+ fs::path build_info_file_path(const PackageSpec& spec) const;
+ fs::path listfile_path(const BinaryParagraph& pgh) const;
+
+ bool is_valid_triplet(const Triplet& t) const;
+
+ fs::path root;
+ fs::path packages;
+ fs::path buildtrees;
+ fs::path downloads;
+ fs::path ports;
+ fs::path installed;
+ fs::path triplets;
+ fs::path scripts;
+
+ fs::path buildsystems;
+ fs::path buildsystems_msbuild_targets;
+
+ fs::path vcpkg_dir;
+ fs::path vcpkg_dir_status_file;
+ fs::path vcpkg_dir_info;
+ fs::path vcpkg_dir_updates;
+
+ fs::path ports_cmake;
+
+ const fs::path& get_cmake_exe() const;
+ const fs::path& get_git_exe() const;
+ const fs::path& get_nuget_exe() const;
+ const Toolset& get_toolset() const;
+
+ private:
+ Lazy<fs::path> cmake_exe;
+ Lazy<fs::path> git_exe;
+ Lazy<fs::path> nuget_exe;
+ Lazy<Toolset> toolset;
+ };
+}