summaryrefslogtreecommitdiff
path: root/contrib/buildsystems/CMakeLists.txt
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-09-28 21:09:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-28 22:11:39 (GMT)
commite18ae4e7a6cd687ba9dac8be1e88a3d99f676fd5 (patch)
tree4c8d8c8260d21eb5910f81d17cd06ae6d5e30959 /contrib/buildsystems/CMakeLists.txt
parent72b6eeb81b163d3b9e4e9546f8041160b2d759c9 (diff)
downloadgit-e18ae4e7a6cd687ba9dac8be1e88a3d99f676fd5.zip
git-e18ae4e7a6cd687ba9dac8be1e88a3d99f676fd5.tar.gz
git-e18ae4e7a6cd687ba9dac8be1e88a3d99f676fd5.tar.bz2
cmake: ensure that the `vcpkg` packages are found on Windows
On Windows, we use the `vcpkg` project to manage the dependencies, via `compat/vcbuild/`. Let's make sure that these dependencies are found by default. This is needed because we are about to recommend loading the Git worktree as a folder into Visual Studio, relying on the automatic CMake support (which would make it relatively cumbersome to adjust the search path used by CMake manually). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/buildsystems/CMakeLists.txt')
-rw-r--r--contrib/buildsystems/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
index 1847a6f..12268f6 100644
--- a/contrib/buildsystems/CMakeLists.txt
+++ b/contrib/buildsystems/CMakeLists.txt
@@ -40,6 +40,13 @@ cmake_minimum_required(VERSION 3.14)
#set the source directory to root of git
set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
+if(WIN32)
+ set(VCPKG_DIR "${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg")
+ list(APPEND CMAKE_PREFIX_PATH "${VCPKG_DIR}/installed/x64-windows")
+
+ # In the vcpkg edition, we need this to be able to link to libcurl
+ set(CURL_NO_CURL_CMAKE ON)
+endif()
find_program(SH_EXE sh PATHS "C:/Program Files/Git/bin")
if(NOT SH_EXE)