cmake: Look for .git folder in SOF_ROOT_SOURCE_DIRECTORY directory

This is possible location of .git folder, instead of CMAKE_SOURCE_DIR.
Without this patch, checked condition always return false and
GIT_LOG_HASH is used instead source code hash.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This commit is contained in:
Karol Trzcinski 2020-08-27 10:16:54 +02:00 committed by Liam Girdwood
parent 3a21088444
commit 97e2a3c583
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ if(NOT SOF_TAG)
endif()
# Calculate source hash value, used to check ldc file and firmware compatibility
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
if(EXISTS ${SOF_ROOT_SOURCE_DIRECTORY}/.git/)
# list tracked files from src directory
execute_process(COMMAND git ls-files src
WORKING_DIRECTORY ${SOF_ROOT_SOURCE_DIRECTORY}