Detect .git instead of CMakeLists.txt in submods

This commit is contained in:
Benitoite 2020-02-10 07:10:46 -08:00 committed by GitHub
parent 6d2671900b
commit 3eb5c881fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,10 +70,10 @@ 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 OR NOT EXISTS ${CMAKE_SOURCE_DIR}/src/xml/pfxml.h)
execute_process(
COMMAND git submodule update --init --recursive
)
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)