Skip to content

Commit

Permalink
Merge pull request #53 from cpp-best-practices/vcpkg-git
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya authored Feb 1, 2022
2 parents 0d3e8a2 + 61640df commit 1eadc31
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,17 @@ macro(run_vcpkg)
if("${_vcpkg_args_VCPKG_URL}" STREQUAL "")
set(_vcpkg_args_VCPKG_URL "https://github.com/microsoft/vcpkg.git")
endif()
execute_process(COMMAND "git" "clone" "${_vcpkg_args_VCPKG_URL}" WORKING_DIRECTORY ${VCPKG_PARENT_DIR})
find_program(GIT_EXECUTABLE "git" REQUIRED)
execute_process(COMMAND "${GIT_EXECUTABLE}" "clone" "${_vcpkg_args_VCPKG_URL}"
WORKING_DIRECTORY ${VCPKG_PARENT_DIR})
# Run vcpkg bootstrap
execute_process(COMMAND "./vcpkg/bootstrap-vcpkg" WORKING_DIRECTORY "${_vcpkg_args_VCPKG_DIR}")
if(WIN32)
execute_process(COMMAND "./vcpkg/bootstrap-vcpkg.bat" "-disableMetrics"
WORKING_DIRECTORY "${_vcpkg_args_VCPKG_DIR}")
else()
execute_process(COMMAND "./vcpkg/bootstrap-vcpkg.sh" "-disableMetrics"
WORKING_DIRECTORY "${_vcpkg_args_VCPKG_DIR}")
endif()
endif()

# Setting up vcpkg toolchain
Expand Down

0 comments on commit 1eadc31

Please sign in to comment.