summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar MerryMage2017-07-16 19:52:05 +0100
committerGravatar MerryMage2017-07-16 19:52:05 +0100
commit9ca672821737f571daddbe8480ef1f6f998eb536 (patch)
tree2304ac955adf66bc980b70c9d45b8c358c86b2c2
parentMerge pull request #2784 from wwylele/font-archive (diff)
downloadyuzu-9ca672821737f571daddbe8480ef1f6f998eb536.tar.gz
yuzu-9ca672821737f571daddbe8480ef1f6f998eb536.tar.xz
yuzu-9ca672821737f571daddbe8480ef1f6f998eb536.zip
CMakeLists: Check that all submodules are present
Diffstat (limited to '')
-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)
19 DESTINATION ${CMAKE_SOURCE_DIR}/.git/hooks) 19 DESTINATION ${CMAKE_SOURCE_DIR}/.git/hooks)
20endif() 20endif()
21 21
22# Sanity check : Check that all submodules are present
23# =======================================================================
24
25function(check_submodules_present)
26 file(READ "${CMAKE_SOURCE_DIR}/.gitmodules" gitmodules)
27 string(REGEX MATCHALL "path *= *[^ \t\r\n]*" gitmodules ${gitmodules})
28 foreach(module ${gitmodules})
29 string(REGEX REPLACE "path *= *" "" module ${module})
30 if (NOT EXISTS "${CMAKE_SOURCE_DIR}/${module}/.git")
31 message(SEND_ERROR "Git submodule ${module} not found."
32 "Please run: git submodule update --init --recursive")
33 endif()
34 endforeach()
35endfunction()
36check_submodules_present()
22 37
23# Detect current compilation architecture and create standard definitions 38# Detect current compilation architecture and create standard definitions
24# ======================================================================= 39# =======================================================================