aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorselsta <selsta@sent.at>2021-10-19 17:26:20 +0200
committerselsta <selsta@sent.at>2021-10-19 17:27:16 +0200
commit9c6111017b724e2da29cf3bb8d68d38bfa5d0dca (patch)
tree9a9cb0367e16161c465182540d6f008506e947cb
parentMerge pull request #8001 (diff)
downloadmonero-9c6111017b724e2da29cf3bb8d68d38bfa5d0dca.tar.xz
cmake: use CMAKE_CURRENT_LIST_DIR for git version
Diffstat (limited to '')
-rw-r--r--cmake/GitVersion.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/GitVersion.cmake b/cmake/GitVersion.cmake
index 6a62bcaa3..2839d549f 100644
--- a/cmake/GitVersion.cmake
+++ b/cmake/GitVersion.cmake
@@ -32,7 +32,7 @@
function (get_version_tag_from_git GIT)
execute_process(COMMAND "${GIT}" rev-parse --short=9 HEAD
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
RESULT_VARIABLE RET
OUTPUT_VARIABLE COMMIT
OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -49,7 +49,7 @@ function (get_version_tag_from_git GIT)
# Get all the tags
execute_process(COMMAND "${GIT}" tag -l --points-at HEAD
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
RESULT_VARIABLE RET
OUTPUT_VARIABLE TAG
OUTPUT_STRIP_TRAILING_WHITESPACE)