From efaef7039e55611596bde79c4ab90734690c1a26 Mon Sep 17 00:00:00 2001 From: Eldred Habert Date: Sun, 18 Feb 2024 23:08:30 +0100 Subject: [PATCH] Make sure to detect Git info from *our* Git repo (#1303) --- CMakeLists.txt | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df1c7cb3..712ce049 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,7 +73,7 @@ endif() find_program(GIT git) if(GIT) - execute_process(COMMAND ${GIT} describe --tags --dirty --always + execute_process(COMMAND ${GIT} --git-dir=.git describe --tags --dirty --always WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_REV OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) diff --git a/Makefile b/Makefile index 1d708b53..642f6f46 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ PNGLDFLAGS := `${PKG_CONFIG} --libs-only-L libpng` PNGLDLIBS := `${PKG_CONFIG} --libs-only-l libpng` # Note: if this comes up empty, `version.cpp` will automatically fall back to last release number -VERSION_STRING := `git describe --tags --dirty --always 2>/dev/null` +VERSION_STRING := `git --git-dir=.git describe --tags --dirty --always 2>/dev/null` # TODO: use -pedantic after non-C++ idioms are gone WARNFLAGS := -Wall -Wno-unknown-warning-option -Wno-c99-designator