From 6cef11a8a42a4ae8bd47dd6dfd6ed66c58ada71c Mon Sep 17 00:00:00 2001 From: Jamie Smith Date: Thu, 9 Dec 2021 21:56:28 -0800 Subject: [PATCH] Fix git release define when building out of source --- host/cmake/set_release.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/host/cmake/set_release.cmake b/host/cmake/set_release.cmake index 6414e4854..91a78bab1 100644 --- a/host/cmake/set_release.cmake +++ b/host/cmake/set_release.cmake @@ -1,7 +1,7 @@ if(NOT DEFINED RELEASE) execute_process( COMMAND git log -n 1 --format=%h - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} RESULT_VARIABLE GIT_EXIT_VALUE ERROR_QUIET OUTPUT_VARIABLE GIT_VERSION @@ -12,6 +12,7 @@ if(NOT DEFINED RELEASE) else (GIT_EXIT_VALUE) execute_process( COMMAND git status -s --untracked-files=no + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE DIRTY ) if ( NOT "${DIRTY}" STREQUAL "" )