guard the default vcpkg directory against multiple CMake instances using it

This commit is contained in:
Nadia Holmquist Pedersen 2023-12-28 19:51:46 +01:00
parent 1cd8c16bbb
commit 63141c086a

View File

@ -4,6 +4,7 @@ set(_DEFAULT_VCPKG_ROOT "${CMAKE_SOURCE_DIR}/vcpkg")
set(VCPKG_ROOT "${_DEFAULT_VCPKG_ROOT}" CACHE STRING "The path to the vcpkg repository")
if (VCPKG_ROOT STREQUAL "${_DEFAULT_VCPKG_ROOT}")
file(LOCK "${_DEFAULT_VCPKG_ROOT}" DIRECTORY GUARD FILE)
FetchContent_Declare(vcpkg
GIT_REPOSITORY "https://github.com/Microsoft/vcpkg.git"
GIT_TAG 2023.12.12