From 9c6b324dba645b06130fda3a53db3a96df1ad081 Mon Sep 17 00:00:00 2001 From: Alex Norman Date: Wed, 15 Nov 2023 16:13:35 -0800 Subject: [PATCH] use GIT_EXECUTABLE --- cmake/OssiaDeps.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/OssiaDeps.cmake b/cmake/OssiaDeps.cmake index da834ff3bd3..c96df7aa10c 100644 --- a/cmake/OssiaDeps.cmake +++ b/cmake/OssiaDeps.cmake @@ -63,13 +63,14 @@ if(Git_FOUND AND OSSIA_SUBMODULE_AUTOUPDATE) set(OSSIA_SUBMODULES ${OSSIA_SUBMODULES} Catch2) endif() - execute_process(COMMAND Git::Git submodule sync --recursive + find_package(Git REQUIRED) + execute_process(COMMAND ${GIT_EXECUTABLE} submodule sync --recursive WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} COMMAND_ERROR_IS_FATAL ANY) foreach(submodule ${OSSIA_SUBMODULES}) message(" -> ${OSSIA_3RDPARTY_FOLDER}/${submodule}") - execute_process(COMMAND git submodule update --init --recursive -- ${OSSIA_3RDPARTY_FOLDER}/${submodule} + execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive -- ${OSSIA_3RDPARTY_FOLDER}/${submodule} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} COMMAND_ERROR_IS_FATAL ANY) endforeach()