2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #7608 from Tatsh/scm-ver-override

Allow overriding SCM version info
This commit is contained in:
bunnei 2021-12-21 16:07:27 -08:00 committed by GitHub
commit b30a1d49ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View file

@ -11,9 +11,15 @@ find_package(Git QUIET PATHS "${GIT_EXECUTABLE}")
# generate git/build information # generate git/build information
include(GetGitRevisionDescription) include(GetGitRevisionDescription)
get_git_head_revision(GIT_REF_SPEC GIT_REV) if(NOT GIT_REF_SPEC)
git_describe(GIT_DESC --always --long --dirty) get_git_head_revision(GIT_REF_SPEC GIT_REV)
git_branch_name(GIT_BRANCH) 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) get_timestamp(BUILD_DATE)
# Generate cpp with Git revision from template # Generate cpp with Git revision from template

View file

@ -22,6 +22,11 @@ add_custom_command(OUTPUT scm_rev.cpp
-DTITLE_BAR_FORMAT_RUNNING=${TITLE_BAR_FORMAT_RUNNING} -DTITLE_BAR_FORMAT_RUNNING=${TITLE_BAR_FORMAT_RUNNING}
-DBUILD_TAG=${BUILD_TAG} -DBUILD_TAG=${BUILD_TAG}
-DBUILD_ID=${DISPLAY_VERSION} -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} -DGIT_EXECUTABLE=${GIT_EXECUTABLE}
-P ${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake -P ${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake
DEPENDS DEPENDS