From dc70a36b44ccea32a4a22c2b562f0c5d9d48bc90 Mon Sep 17 00:00:00 2001 From: Jake Merdich Date: Thu, 5 Dec 2019 22:48:20 -0500 Subject: Ignore git-related files in cmake for EA tarballs This fixes the early-access builds on Windows (tested on EA 58). Cmake was previously looking for git-related files that were stripped out of the early access builds and failing; check if those exist before reading them. --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b3b0d6d5..118572c03 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ option(ENABLE_VULKAN "Enables Vulkan backend" ON) option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF) -if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit) +if(EXISTS ${PROJECT_SOURCE_DIR}/hooks/pre-commit AND NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/hooks/pre-commit) message(STATUS "Copying pre-commit hook") file(COPY hooks/pre-commit DESTINATION ${PROJECT_SOURCE_DIR}/.git/hooks) @@ -49,7 +49,10 @@ function(check_submodules_present) endif() endforeach() endfunction() -check_submodules_present() + +if(EXISTS ${PROJECT_SOURCE_DIR}/.gitmodules) + check_submodules_present() +endif() configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc -- cgit v1.2.3