diff --git a/template/cmake/vcpkg/bootstrap/vcpkg_bootstrap.cmake b/template/cmake/vcpkg/bootstrap/vcpkg_bootstrap.cmake index c697a0c..5546f78 100644 --- a/template/cmake/vcpkg/bootstrap/vcpkg_bootstrap.cmake +++ b/template/cmake/vcpkg/bootstrap/vcpkg_bootstrap.cmake @@ -188,6 +188,10 @@ function(_vcpkg_bootstrap) "${arg_UNPARSED_ARGUMENTS}") endif() + if(NOT DEFINED arg_REPO) + set(arg_REPO https://github.com/microsoft/vcpkg.git) + endif() + find_package(Git QUIET REQUIRED) if(DEFINED CACHE{_VCPKG_ROOT}) diff --git a/template/cmake/vcpkg/vcpkg.toolchain.cmake.jinja b/template/cmake/vcpkg/vcpkg.toolchain.cmake.jinja index acf91aa..ae52534 100644 --- a/template/cmake/vcpkg/vcpkg.toolchain.cmake.jinja +++ b/template/cmake/vcpkg/vcpkg.toolchain.cmake.jinja @@ -27,5 +27,4 @@ set(VCPKG_VERBOSE file(READ ${CMAKE_SOURCE_DIR}/vcpkg.json _vcpkg_json) string(JSON _builtin_baseline GET ${_vcpkg_json} builtin-baseline) -vcpkg_configure(CACHE_DIR_NAME {{ ss_cmake_repo_name}} REPO - https://github.com/microsoft/vcpkg.git REF ${_builtin_baseline}) +vcpkg_configure(CACHE_DIR_NAME {{ ss_cmake_repo_name}} REF ${_builtin_baseline})