Merge pull request #12 from Benitoite/patch-1

CMakeLists.txt: download submodules if needed
This commit is contained in:
Patrick Brosi 2020-02-11 10:18:51 +01:00 committed by GitHub
commit 1163f11e57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,6 +68,14 @@ else()
set(VERSION_GIT_FULL "${VERSION_GIT}-${VERSION_GIT_IS_DIRTY}") set(VERSION_GIT_FULL "${VERSION_GIT}-${VERSION_GIT_IS_DIRTY}")
endif() endif()
# Download submodules if needed
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/src/configparser/.git OR NOT EXISTS ${CMAKE_SOURCE_DIR}/src/cppgtfs/.git OR NOT EXISTS ${CMAKE_SOURCE_DIR}/src/xml/.git)
execute_process(
COMMAND git submodule update --init --recursive
)
endif()
add_subdirectory(src) add_subdirectory(src)
# tests # tests