summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2020-01-16 10:00:43 -0500
committerGravatar GitHub2020-01-16 10:00:43 -0500
commita43ac8c79e5dae76a5a64f388045f0fa8c16b0cc (patch)
tree886130420a22ae13106179ed4c25bb02ce260701
parentMerge pull request #3303 from lioncash/reorder (diff)
parentFix git version in scm_rev.cpp (diff)
downloadyuzu-a43ac8c79e5dae76a5a64f388045f0fa8c16b0cc.tar.gz
yuzu-a43ac8c79e5dae76a5a64f388045f0fa8c16b0cc.tar.xz
yuzu-a43ac8c79e5dae76a5a64f388045f0fa8c16b0cc.zip
Merge pull request #3307 from jroweboy/fix-git
Fix git version in scm_rev.cpp
-rw-r--r--CMakeModules/GenerateSCMRev.cmake4
-rw-r--r--src/common/CMakeLists.txt5
2 files changed, 9 insertions, 0 deletions
diff --git a/CMakeModules/GenerateSCMRev.cmake b/CMakeModules/GenerateSCMRev.cmake
index 21e03ae98..fa7ae835f 100644
--- a/CMakeModules/GenerateSCMRev.cmake
+++ b/CMakeModules/GenerateSCMRev.cmake
@@ -5,6 +5,10 @@ function(get_timestamp _var)
5endfunction() 5endfunction()
6 6
7list(APPEND CMAKE_MODULE_PATH "${SRC_DIR}/externals/cmake-modules") 7list(APPEND CMAKE_MODULE_PATH "${SRC_DIR}/externals/cmake-modules")
8
9# Find the package here with the known path so that the GetGit commands can find it as well
10find_package(Git QUIET PATHS "${GIT_EXECUTABLE}")
11
8# generate git/build information 12# generate git/build information
9include(GetGitRevisionDescription) 13include(GetGitRevisionDescription)
10get_git_head_revision(GIT_REF_SPEC GIT_REV) 14get_git_head_revision(GIT_REF_SPEC GIT_REV)
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 9b0c3db68..9afc6105d 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -15,6 +15,10 @@ endif ()
15if (DEFINED ENV{DISPLAYVERSION}) 15if (DEFINED ENV{DISPLAYVERSION})
16 set(DISPLAY_VERSION $ENV{DISPLAYVERSION}) 16 set(DISPLAY_VERSION $ENV{DISPLAYVERSION})
17endif () 17endif ()
18
19# Pass the path to git to the GenerateSCMRev.cmake as well
20find_package(Git QUIET)
21
18add_custom_command(OUTPUT scm_rev.cpp 22add_custom_command(OUTPUT scm_rev.cpp
19 COMMAND ${CMAKE_COMMAND} 23 COMMAND ${CMAKE_COMMAND}
20 -DSRC_DIR="${CMAKE_SOURCE_DIR}" 24 -DSRC_DIR="${CMAKE_SOURCE_DIR}"
@@ -23,6 +27,7 @@ add_custom_command(OUTPUT scm_rev.cpp
23 -DTITLE_BAR_FORMAT_RUNNING="${TITLE_BAR_FORMAT_RUNNING}" 27 -DTITLE_BAR_FORMAT_RUNNING="${TITLE_BAR_FORMAT_RUNNING}"
24 -DBUILD_TAG="${BUILD_TAG}" 28 -DBUILD_TAG="${BUILD_TAG}"
25 -DBUILD_ID="${DISPLAY_VERSION}" 29 -DBUILD_ID="${DISPLAY_VERSION}"
30 -DGIT_EXECUTABLE="${GIT_EXECUTABLE}"
26 -P "${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake" 31 -P "${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake"
27 DEPENDS 32 DEPENDS
28 # WARNING! It was too much work to try and make a common location for this list, 33 # WARNING! It was too much work to try and make a common location for this list,