Supply the source directory as working directory when launching Git commands. Should...
authorColin Finck <colin@reactos.org>
Tue, 3 Oct 2017 13:29:13 +0000 (15:29 +0200)
committerColin Finck <colin@reactos.org>
Tue, 3 Oct 2017 13:29:13 +0000 (15:29 +0200)
sdk/include/reactos/version.cmake

index 6c2247a..9c7cd1a 100644 (file)
@@ -29,6 +29,7 @@ if(EXISTS "${REACTOS_SOURCE_DIR}/.git")
     if(GIT_FOUND)
         execute_process(
             COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD
+            WORKING_DIRECTORY ${REACTOS_SOURCE_DIR}
             OUTPUT_VARIABLE GIT_COMMIT_HASH
             RESULT_VARIABLE GIT_CALL_RESULT
             OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -39,6 +40,7 @@ if(EXISTS "${REACTOS_SOURCE_DIR}/.git")
 
         execute_process(
             COMMAND "${GIT_EXECUTABLE}" describe
+            WORKING_DIRECTORY ${REACTOS_SOURCE_DIR}
             OUTPUT_VARIABLE GIT_DESCRIBE_REVISION
             RESULT_VARIABLE GIT_CALL_RESULT
             OUTPUT_STRIP_TRAILING_WHITESPACE