From dabd4181fd62ce02cd8845cfe814104d56a93407 Mon Sep 17 00:00:00 2001 From: YuzukiTsuru Date: Sat, 2 Dec 2023 00:16:57 +0800 Subject: [PATCH] [bug] fix PROJECT_GIT_HASH null --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2fee85f..19306375 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ set(PROJECT_VERSION_MINOR 0) # use git version as library version find_package(Git QUIET) -if (Git_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../.git") +if (Git_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") execute_process( COMMAND ${GIT_EXECUTABLE} rev-list --count HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}