summaryrefslogtreecommitdiff
path: root/CMakeModules/GenerateSCMRev.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeModules/GenerateSCMRev.cmake')
-rw-r--r--CMakeModules/GenerateSCMRev.cmake10
1 files changed, 2 insertions, 8 deletions
diff --git a/CMakeModules/GenerateSCMRev.cmake b/CMakeModules/GenerateSCMRev.cmake
index 0e4bd121c..2cdb9189a 100644
--- a/CMakeModules/GenerateSCMRev.cmake
+++ b/CMakeModules/GenerateSCMRev.cmake
@@ -7,11 +7,6 @@ function(get_timestamp _var)
7 set(${_var} "${timestamp}" PARENT_SCOPE) 7 set(${_var} "${timestamp}" PARENT_SCOPE)
8endfunction() 8endfunction()
9 9
10list(APPEND CMAKE_MODULE_PATH "${SRC_DIR}/externals/cmake-modules")
11
12# Find the package here with the known path so that the GetGit commands can find it as well
13find_package(Git QUIET PATHS "${GIT_EXECUTABLE}")
14
15# generate git/build information 10# generate git/build information
16include(GetGitRevisionDescription) 11include(GetGitRevisionDescription)
17if(NOT GIT_REF_SPEC) 12if(NOT GIT_REF_SPEC)
@@ -29,6 +24,7 @@ get_timestamp(BUILD_DATE)
29# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well 24# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well
30set(REPO_NAME "") 25set(REPO_NAME "")
31set(BUILD_VERSION "0") 26set(BUILD_VERSION "0")
27set(BUILD_ID ${DISPLAY_VERSION})
32if (BUILD_REPOSITORY) 28if (BUILD_REPOSITORY)
33 # regex capture the string nightly or canary into CMAKE_MATCH_1 29 # regex capture the string nightly or canary into CMAKE_MATCH_1
34 string(REGEX MATCH "yuzu-emu/yuzu-?(.*)" OUTVAR ${BUILD_REPOSITORY}) 30 string(REGEX MATCH "yuzu-emu/yuzu-?(.*)" OUTVAR ${BUILD_REPOSITORY})
@@ -57,6 +53,4 @@ if (BUILD_REPOSITORY)
57 endif() 53 endif()
58endif() 54endif()
59 55
60# The variable SRC_DIR must be passed into the script 56configure_file(scm_rev.cpp.in scm_rev.cpp @ONLY)
61# (since it uses the current build directory for all values of CMAKE_*_DIR)
62configure_file("${SRC_DIR}/src/common/scm_rev.cpp.in" "scm_rev.cpp" @ONLY)