[cmake] check if submodule dir is empty (#182)
previously, it would check for Git submodules... which fails for source packs... Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: #182
This commit is contained in:
parent
e7becc15b4
commit
9966da9ff3
1 changed files with 4 additions and 1 deletions
|
@ -252,7 +252,10 @@ function(check_submodules_present)
|
|||
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")
|
||||
|
||||
file(GLOB RESULT "${PROJECT_SOURCE_DIR}/${module}/*")
|
||||
list(LENGTH RESULT RES_LEN)
|
||||
if(RES_LEN EQUAL 0)
|
||||
message(FATAL_ERROR "Git submodule ${module} not found. "
|
||||
"Please run: \ngit submodule update --init --recursive")
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue