From 14733f4575befc3e9fa782d1548933f56b0ca703 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:12:17 -0500 Subject: [PATCH] cmake: Use git clone instead of file copy Preserves (enough) git repository data for configuration to work without error. --- externals/tz/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/externals/tz/CMakeLists.txt b/externals/tz/CMakeLists.txt index 3fa28e4..48bc9c0 100644 --- a/externals/tz/CMakeLists.txt +++ b/externals/tz/CMakeLists.txt @@ -12,7 +12,11 @@ endif() if (NOT EXISTS "${TZ_DIR}" OR NOT EXISTS "${TZIF_LIST_FILE}") # tz's makefile can only build in-tree, so copy the whole source tree to a # separate directory before building. - file(COPY ${TZ_SOURCE_DIR}/ DESTINATION ${TZ_TMP_SOURCE_DIR}) + execute_process( + COMMAND + ${GIT_PROGRAM} clone --depth 1 "file://${TZ_SOURCE_DIR}" "${TZ_TMP_SOURCE_DIR}" + COMMAND_ERROR_IS_FATAL ANY + ) if (APPLE) set(TZ_MAKEFLAGS "LDLIBS=${Intl_LIBRARY}")