summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-12-22 01:07:27 +0100
committerGitHub <noreply@github.com>2021-12-22 01:07:27 +0100
commitb30a1d49ff42fa4207db85c4e4ba538f286065e7 (patch)
treecea130c529ff5490a0baeaea557f779c25d88174
parentMerge pull request #7481 from german77/gyro-bias (diff)
parentAllow overriding SCM version info (diff)
downloadyuzu-b30a1d49ff42fa4207db85c4e4ba538f286065e7.tar
yuzu-b30a1d49ff42fa4207db85c4e4ba538f286065e7.tar.gz
yuzu-b30a1d49ff42fa4207db85c4e4ba538f286065e7.tar.bz2
yuzu-b30a1d49ff42fa4207db85c4e4ba538f286065e7.tar.lz
yuzu-b30a1d49ff42fa4207db85c4e4ba538f286065e7.tar.xz
yuzu-b30a1d49ff42fa4207db85c4e4ba538f286065e7.tar.zst
yuzu-b30a1d49ff42fa4207db85c4e4ba538f286065e7.zip
-rw-r--r--CMakeModules/GenerateSCMRev.cmake12
-rw-r--r--src/common/CMakeLists.txt5
2 files changed, 14 insertions, 3 deletions
diff --git a/CMakeModules/GenerateSCMRev.cmake b/CMakeModules/GenerateSCMRev.cmake
index 43ca730ec..c7da2b91d 100644
--- a/CMakeModules/GenerateSCMRev.cmake
+++ b/CMakeModules/GenerateSCMRev.cmake
@@ -11,9 +11,15 @@ find_package(Git QUIET PATHS "${GIT_EXECUTABLE}")
# generate git/build information
include(GetGitRevisionDescription)
-get_git_head_revision(GIT_REF_SPEC GIT_REV)
-git_describe(GIT_DESC --always --long --dirty)
-git_branch_name(GIT_BRANCH)
+if(NOT GIT_REF_SPEC)
+ get_git_head_revision(GIT_REF_SPEC GIT_REV)
+endif()
+if(NOT GIT_DESC)
+ git_describe(GIT_DESC --always --long --dirty)
+endif()
+if (NOT GIT_BRANCH)
+ git_branch_name(GIT_BRANCH)
+endif()
get_timestamp(BUILD_DATE)
# Generate cpp with Git revision from template
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 919da4a53..790193b00 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -22,6 +22,11 @@ add_custom_command(OUTPUT scm_rev.cpp
-DTITLE_BAR_FORMAT_RUNNING=${TITLE_BAR_FORMAT_RUNNING}
-DBUILD_TAG=${BUILD_TAG}
-DBUILD_ID=${DISPLAY_VERSION}
+ -DGIT_REF_SPEC=${GIT_REF_SPEC}
+ -DGIT_REV=${GIT_REV}
+ -DGIT_DESC=${GIT_DESC}
+ -DGIT_BRANCH=${GIT_BRANCH}
+ -DBUILD_FULLNAME=${BUILD_FULLNAME}
-DGIT_EXECUTABLE=${GIT_EXECUTABLE}
-P ${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake
DEPENDS