pineapple/patches/inject-git-info.patch

41 lines
1.6 KiB
Diff
Raw Normal View History

2020-12-28 16:15:37 +01:00
diff --git a/CMakeModules/GenerateSCMRev.cmake b/CMakeModules/GenerateSCMRev.cmake
--- a/CMakeModules/GenerateSCMRev.cmake
+++ b/CMakeModules/GenerateSCMRev.cmake
2021-01-12 10:22:33 +01:00
@@ -11,10 +11,10 @@
2020-12-28 16:15:37 +01:00
# 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)
2021-01-12 10:22:33 +01:00
-get_timestamp(BUILD_DATE)
2020-12-28 16:15:37 +01:00
+#get_git_head_revision(GIT_REF_SPEC GIT_REV)
+#git_describe(GIT_DESC --always --long --dirty)
+#git_branch_name(GIT_BRANCH)
2021-01-12 10:22:33 +01:00
+#get_timestamp(BUILD_DATE)
2020-12-28 16:15:37 +01:00
# Generate cpp with Git revision from template
2021-01-12 10:22:33 +01:00
# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well
@@ -113,4 +113,5 @@
2020-12-28 16:15:37 +01:00
set(COMBINED "${COMBINED}${TMP}")
endforeach()
string(MD5 SHADER_CACHE_VERSION "${COMBINED}")
+set(BUILD_FULLNAME "${BUILD_FULLNAME} ")
configure_file("${SRC_DIR}/src/common/scm_rev.cpp.in" "scm_rev.cpp" @ONLY)
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
2021-01-12 10:22:33 +01:00
@@ -28,6 +28,12 @@
2020-12-28 16:15:37 +01:00
-DBUILD_TAG="${BUILD_TAG}"
-DBUILD_ID="${DISPLAY_VERSION}"
-DGIT_EXECUTABLE="${GIT_EXECUTABLE}"
+ -DGIT_REF_SPEC="${GIT_REF_SPEC}"
+ -DGIT_REV="${GIT_REV}"
+ -DGIT_DESC="${GIT_DESC}"
+ -DGIT_BRANCH="${GIT_BRANCH}"
+ -DBUILD_FULLNAME="${BUILD_FULLNAME}"
2021-01-12 10:22:33 +01:00
+ -DBUILD_DATE="${BUILD_DATE}"
2020-12-28 16:15:37 +01:00
-P "${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake"
DEPENDS
# WARNING! It was too much work to try and make a common location for this list,