CMakeLists: Use presence of src, not .git dir to determine libshared presence

This way the mechanism to determine the presence of libshared works for
tarball builds as well.
This commit is contained in:
Tomas Babej
2021-10-02 17:57:35 -04:00
parent 35794a57b5
commit 0ad1b681de

View File

@@ -28,13 +28,13 @@ else (ENABLE_SYNC)
endif (ENABLE_SYNC)
message ("-- Looking for libshared")
if (EXISTS ${CMAKE_SOURCE_DIR}/src/libshared/.git)
if (EXISTS ${CMAKE_SOURCE_DIR}/src/libshared/src)
message ("-- Found libshared")
else (EXISTS ${CMAKE_SOURCE_DIR}/src/libshared/.git)
else (EXISTS ${CMAKE_SOURCE_DIR}/src/libshared/src)
message ("-- Cloning libshared")
execute_process (COMMAND git submodule update --init
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif (EXISTS ${CMAKE_SOURCE_DIR}/src/libshared/.git)
endif (EXISTS ${CMAKE_SOURCE_DIR}/src/libshared/src)
message ("-- Looking for SHA1 references")
if (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)