cmake: add knob to disable vcpkg
authorMatthew Rogers <mattr94@gmail.com>
Sun, 6 Jun 2021 12:02:52 +0000 (12:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 11 Jun 2021 06:23:00 +0000 (15:23 +0900)
commitcd0a852981162fb77f9fac68f231e3d41a99c993
tree9ab120314814488b001f61a327435f3ad111e28d
parent48bf2fa8bad054d66bd79c6ba903c89c704201f7
cmake: add knob to disable vcpkg

When building on windows users have the option to use vcpkg to provide
the dependencies needed to compile.  Previously, this was used only when
using the Visual Studio generator which was not ideal because:

  - Not all users who want to use vcpkg use the Visual Studio
    generators.

  - Some versions of Visual Studio 2019 moved away from using the
    VS 2019  generator by default, making it impossible for Visual
    Studio to configure the project in the likely event that it couldn't
    find the dependencies.

  - Inexperienced users of CMake are very likely to get tripped up by
    the errors caused by a lack of vcpkg, making the above bullet point
    both annoying and hard to debug.

As such, let's make using vcpkg the default on windows.  Users who want
to avoid using vcpkg can disable it by passing -DNO_VCPKG=TRUE.

Signed-off-by: Matthew Rogers <mattr94@gmail.com>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/buildsystems/CMakeLists.txt