aboutsummaryrefslogtreecommitdiff
path: root/CMakeModules
diff options
context:
space:
mode:
authorJames Rowe <jroweboy@gmail.com>2020-01-16 00:12:50 -0700
committerJames Rowe <jroweboy@gmail.com>2020-01-16 00:12:50 -0700
commit47197f6b188458eb57272e77ac0d3e574e47ccfc (patch)
tree886130420a22ae13106179ed4c25bb02ce260701 /CMakeModules
parent399da88e9f54377be92b65d52b1f99f7095ea2d0 (diff)
Fix git version in scm_rev.cpp
Diffstat (limited to 'CMakeModules')
-rw-r--r--CMakeModules/GenerateSCMRev.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeModules/GenerateSCMRev.cmake b/CMakeModules/GenerateSCMRev.cmake
index 21e03ae98f..fa7ae835fa 100644
--- a/CMakeModules/GenerateSCMRev.cmake
+++ b/CMakeModules/GenerateSCMRev.cmake
@@ -5,6 +5,10 @@ function(get_timestamp _var)
endfunction()
list(APPEND CMAKE_MODULE_PATH "${SRC_DIR}/externals/cmake-modules")
+
+# Find the package here with the known path so that the GetGit commands can find it as well
+find_package(Git QUIET PATHS "${GIT_EXECUTABLE}")
+
# generate git/build information
include(GetGitRevisionDescription)
get_git_head_revision(GIT_REF_SPEC GIT_REV)