mirror of https://github.com/PCSX2/pcsx2.git
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
This commit is contained in:
parent
e0add8003d
commit
f392493245
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue