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
No known key found for this signature in database
GPG key ID: B0747C6578F7D2F5

View file

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