diff options
author | Tobias <thm.frey@gmail.com> | 2019-06-29 22:19:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-29 22:19:47 +0200 |
commit | cae9708a00c9e2f69802b9fdb43cf7413ca25e83 (patch) | |
tree | bc4e5375a0d68f418cc11c811186b482ad7ef399 /CMakeLists.txt | |
parent | Merge pull request #2533 from DarkLordZach/memory-frozen (diff) | |
download | yuzu-cae9708a00c9e2f69802b9fdb43cf7413ca25e83.tar yuzu-cae9708a00c9e2f69802b9fdb43cf7413ca25e83.tar.gz yuzu-cae9708a00c9e2f69802b9fdb43cf7413ca25e83.tar.bz2 yuzu-cae9708a00c9e2f69802b9fdb43cf7413ca25e83.tar.lz yuzu-cae9708a00c9e2f69802b9fdb43cf7413ca25e83.tar.xz yuzu-cae9708a00c9e2f69802b9fdb43cf7413ca25e83.tar.zst yuzu-cae9708a00c9e2f69802b9fdb43cf7413ca25e83.zip |
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a207f9e3..bfa104034 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,18 +7,6 @@ include(CMakeDependentOption) project(yuzu) -# Get Git submodule dependencies -find_package(Git QUIET) -if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") - execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - RESULT_VARIABLE GIT_SUBMOD_RESULT) - if(NOT GIT_SUBMOD_RESULT EQUAL "0") - message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, " - "please checkout submodules manually with \"git submodule update --init --recursive\"") - endif() -endif() - # Set bundled sdl2/qt as dependent options. # OFF by default, but if ENABLE_SDL2 and MSVC are true then ON option(ENABLE_SDL2 "Enable the SDL2 frontend" ON) @@ -45,6 +33,22 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit) DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks) endif() +# Sanity check : Check that all submodules are present +# ======================================================================= + +function(check_submodules_present) + file(READ "${PROJECT_SOURCE_DIR}/.gitmodules" gitmodules) + string(REGEX MATCHALL "path *= *[^ \t\r\n]*" gitmodules ${gitmodules}) + foreach(module ${gitmodules}) + string(REGEX REPLACE "path *= *" "" module ${module}) + if (NOT EXISTS "${PROJECT_SOURCE_DIR}/${module}/.git") + message(FATAL_ERROR "Git submodule ${module} not found. " + "Please run: git submodule update --init --recursive") + endif() + endforeach() +endfunction() +check_submodules_present() + configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc COPYONLY) |