Always update Win32 dependencies git submodule.

Instead of just checking if the submodule has been cloned, always update
it when cmake runs if git is available.

This fixes the problem of users' dependencies submodule clone never
getting updated with new changes.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2020-08-21 07:03:35 +00:00
parent 84d406ac0e
commit 4148080eb5
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 11 additions and 11 deletions

View File

@ -209,7 +209,6 @@ option(ENABLE_LTO "Compile with Link Time Optimization (gcc and clang only)" ${L
if(WIN32 OR CMAKE_TOOLCHAIN_FILE MATCHES "[Mm][Ii][Nn][Gg][Ww]")
# Win32 deps submodule
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/dependencies/mingw-xaudio/include")
set(git_checkout FALSE)
if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
@ -221,6 +220,7 @@ if(WIN32 OR CMAKE_TOOLCHAIN_FILE MATCHES "[Mm][Ii][Nn][Gg][Ww]")
)
endif()
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/dependencies/mingw-xaudio/include")
if(NOT (git_checkout AND git_status EQUAL 0))
message(FATAL_ERROR "Please pull in git submodules, e.g.\nrun: git submodule update --init --remote --recursive")
endif()