CMakeLists.txt: download submodules if needed
Download git submodules if the CMakeLists.txt files for the configparser or cppgtfs directories are not present.
This commit is contained in:
parent
9262b3ad45
commit
f856e9865c
1 changed files with 8 additions and 0 deletions
|
@ -68,6 +68,14 @@ else()
|
|||
set(VERSION_GIT_FULL "${VERSION_GIT}-${VERSION_GIT_IS_DIRTY}")
|
||||
endif()
|
||||
|
||||
# Download submodules if needed
|
||||
|
||||
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/src/configparser/CMakeLists.txt OR NOT EXISTS ${CMAKE_SOURCE_DIR}/src/cppgtfs/CMakeLists.txt)
|
||||
execute_process(
|
||||
COMMAND git submodule update --init --recursive
|
||||
)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
# tests
|
||||
|
|
Loading…
Reference in a new issue