[cmake] submodules: only add to CPMUtil if git exists
Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
15ba975916
commit
84818e9865
1 changed files with 20 additions and 19 deletions
|
@ -268,7 +268,7 @@ function(check_submodules_present)
|
|||
message(FATAL_ERROR "Git submodule ${module} not found. "
|
||||
"Please run: \ngit submodule update --init --recursive")
|
||||
endif()
|
||||
|
||||
if (EXISTS "${PROJECT_SOURCE_DIR}/${module}/.git")
|
||||
set(SUBMODULE_DIR "${PROJECT_SOURCE_DIR}/${module}")
|
||||
|
||||
execute_process(
|
||||
|
@ -292,6 +292,7 @@ function(check_submodules_present)
|
|||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_NAMES ${SUBMODULE_NAME})
|
||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS ${SUBMODULE_SHA})
|
||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_URLS ${SUBMODULE_URL})
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue