diff --git a/CMakeLists.txt b/CMakeLists.txt index fbaf775..008bd55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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/.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) # tests