From f3924932450e56a3740245f61b158c8090579192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=2E=20Col=C3=B3n=20V=C3=A9lez?= Date: Tue, 6 Jan 2015 21:14:10 -0500 Subject: [PATCH] Don't assume .git exists just because git is installed. find_package(Git) is done in SearchForStuff it could be deleted over there but it fits better there. The only thing this line did was saying git was not found for a second time since if it was found then it never triggered. . Check for the existance of .git to avoid fatal: Not a git repository (or any of the parent directories): .git --- cmake/Pcsx2Utils.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/Pcsx2Utils.cmake b/cmake/Pcsx2Utils.cmake index 91f18fc019..420e0f5e1d 100644 --- a/cmake/Pcsx2Utils.cmake +++ b/cmake/Pcsx2Utils.cmake @@ -37,9 +37,8 @@ function(detectOperatingSystem) endfunction() function(write_svnrev_h) - find_package(Git) set(PCSX2_WC_TIME 0) - if (GIT_FOUND) + if (GIT_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.git) EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} show -s --format=%ci HEAD OUTPUT_VARIABLE PCSX2_WC_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)