aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2020-09-22 20:16:24 -0700
committerGitHub <noreply@github.com>2020-09-22 20:16:24 -0700
commit5d33bd3d7910c6090911f71f9dcf1a4eecd303da (patch)
treecbd4b6e0562f4f0a18b2489cb7e43ab110b1432c /toolsrc/include
parent1095c177a9e1616921c03ffcd3a7799c627b5cd0 (diff)
downloadvcpkg-5d33bd3d7910c6090911f71f9dcf1a4eecd303da.tar.gz
vcpkg-5d33bd3d7910c6090911f71f9dcf1a4eecd303da.zip
[vcpkg] Fix the case of current_path() before use on Windows. (#13537)
* Fix the case of current_path() before use on Windows. This is a better solution than that I tried in https://github.com/microsoft/vcpkg/pull/13144 -- rather than trying to cannoicalize the path completely, which would destroy symlinks etc; this form calls FindFirstFile on each path element to get the real case from the filesystem. Fixes #13105. (Note the wrong case in the CWD in the prompt, but the correct case in all the output:) PS C:\DeV\vcPKG> .\vcpkg.exe install curl Computing installation plan... The following packages will be built and installed: curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows * zlib[core]:x86-windows Additional packages (*) will be modified to complete this operation. Detecting compiler hash for triplet x86-windows... Starting package 1/2: zlib:x86-windows Building package zlib[core]:x86-windows... Using cached binary package: C:\Users\billy\AppData\Local\vcpkg/archives\c6\c61dd1bcc23348934c55f4ced77f1e4b0f353394.zipBuilding package zlib[core]:x86-windows... done Installing package zlib[core]:x86-windows... Installing package zlib[core]:x86-windows... done Elapsed time for package zlib:x86-windows: 62.26 ms Starting package 2/2: curl:x86-windows Building package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows... Could not locate cached archive: C:\Users\billy\AppData\Local\vcpkg/archives\9f\9fa16d473c9539e9ea7ab3922eff46618f3a4c4b.zip -- Downloading https://github.com/curl/curl/archive/9d954e49bce3706a9a2efb119ecd05767f0f2a9e.tar.gz... -- Extracting source C:/Dev/vcpkg/downloads/curl-curl-9d954e49bce3706a9a2efb119ecd05767f0f2a9e.tar.gz -- Applying patch 0002_fix_uwp.patch -- Applying patch 0004_nghttp2_staticlib.patch -- Applying patch 0005_remove_imp_suffix.patch -- Applying patch 0006_fix_tool_depends.patch -- Applying patch 0007_disable_tool_export_curl_target.patch -- Applying patch 0009_fix_openssl_config.patch -- Applying patch 0010_fix_othertests_cmake.patch -- Applying patch 0011_fix_static_build.patch -- Using source at C:/Dev/vcpkg/buildtrees/curl/src/767f0f2a9e-91d24adee1.clean -- Configuring x86-windows -- Building x86-windows-dbg -- Building x86-windows-rel -- Installing: C:/Dev/vcpkg/packages/curl_x86-windows/share/curl/curl-config -- Installing: C:/Dev/vcpkg/packages/curl_x86-windows/share/curl/vcpkg-cmake-wrapper.cmake -- Installing: C:/Dev/vcpkg/packages/curl_x86-windows/share/curl/copyright -- Performing post-build validation -- Performing post-build validation done Stored binary cache: C:\Users\billy\AppData\Local\vcpkg/archives\9f\9fa16d473c9539e9ea7ab3922eff46618f3a4c4b.zip Building package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows... done Installing package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows... Installing package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows... done Elapsed time for package curl:x86-windows: 1.299 min Total elapsed time: 1.33 min The package curl:x86-windows provides CMake targets: find_package(CURL CONFIG REQUIRED) target_link_libraries(main PRIVATE CURL::libcurl) PS C:\DeV\vcPKG> * Fix *nix builds. * PR feedback. * Update toolsrc/src/vcpkg/base/files.cpp Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/base/files.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h
index 08bbe7906..71e386a5c 100644
--- a/toolsrc/include/vcpkg/base/files.h
+++ b/toolsrc/include/vcpkg/base/files.h
@@ -237,4 +237,8 @@ namespace vcpkg::Files
/// Performs "lhs / rhs" according to the C++17 Filesystem Library Specification.
/// This function exists as a workaround for TS implementations.
fs::path combine(const fs::path& lhs, const fs::path& rhs);
+
+#if defined(_WIN32)
+ fs::path win32_fix_path_case(const fs::path& source);
+#endif // _WIN32
}