cmake: support manual submodules

This commit is contained in:
selsta 2020-09-20 03:51:40 +02:00
parent d313c2de37
commit e1987522e2
No known key found for this signature in database
GPG key ID: 2EA0A99A8B07AE5E

View file

@ -29,8 +29,9 @@ set(BUILD_GUI_DEPS ON)
set(ARCH "x86-64")
set(BUILD_64 ON)
find_package(Git)
if(GIT_FOUND)
if(NOT MANUAL_SUBMODULES)
find_package(Git)
if(GIT_FOUND)
if(NOT DEV_MODE)
function (check_submodule relative_path)
execute_process(COMMAND git rev-parse "HEAD" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${relative_path} OUTPUT_VARIABLE localHead)
@ -52,6 +53,7 @@ if(GIT_FOUND)
message(FATAL_ERROR "Updating git submodule to master (-DDEV_MODE=ON) failed")
endif()
endif()
endif()
endif()
add_subdirectory(monero)