summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-07-17 15:52:34 +0200
committerGitHub <noreply@github.com>2017-07-17 15:52:34 +0200
commit308292dfa1674e68bb14179bc5a82710e6e24616 (patch)
tree7ec217b48e899505c84be4474287bdc11da5c7f8
parentstubbed frd::UnscrambleLocalFriendCode (#2827) (diff)
parentCMakeLists: Check that all submodules are present (diff)
downloadyuzu-308292dfa1674e68bb14179bc5a82710e6e24616.tar
yuzu-308292dfa1674e68bb14179bc5a82710e6e24616.tar.gz
yuzu-308292dfa1674e68bb14179bc5a82710e6e24616.tar.bz2
yuzu-308292dfa1674e68bb14179bc5a82710e6e24616.tar.lz
yuzu-308292dfa1674e68bb14179bc5a82710e6e24616.tar.xz
yuzu-308292dfa1674e68bb14179bc5a82710e6e24616.tar.zst
yuzu-308292dfa1674e68bb14179bc5a82710e6e24616.zip
-rw-r--r--CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad73cf495..9151ff786 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,21 @@ if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit)
DESTINATION ${CMAKE_SOURCE_DIR}/.git/hooks)
endif()
+# Sanity check : Check that all submodules are present
+# =======================================================================
+
+function(check_submodules_present)
+ file(READ "${CMAKE_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 "${CMAKE_SOURCE_DIR}/${module}/.git")
+ message(SEND_ERROR "Git submodule ${module} not found."
+ "Please run: git submodule update --init --recursive")
+ endif()
+ endforeach()
+endfunction()
+check_submodules_present()
# Detect current compilation architecture and create standard definitions
# =======================================================================