aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Kaijser <martijn@xbmc.org>2017-10-14 12:56:27 +0200
committerGitHub <noreply@github.com>2017-10-14 12:56:27 +0200
commit2852c5e09f1e809a9e625cb05921813f5f9a6507 (patch)
tree2d73372943a6cf4e0b907d0e5df66a70a45aab7e
parent857c640bc632d86bb3ecc949ad2a13912f240911 (diff)
parentf0f1b74cedc869a9b30788fc13aa2233e23166bc (diff)
Merge pull request #12924 from wsnipex/Krypton
[cmake] allow reading GIT_REV from a VERSION file
-rw-r--r--project/cmake/scripts/common/Macros.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/project/cmake/scripts/common/Macros.cmake b/project/cmake/scripts/common/Macros.cmake
index d8cdce9ce2..07fa493ffc 100644
--- a/project/cmake/scripts/common/Macros.cmake
+++ b/project/cmake/scripts/common/Macros.cmake
@@ -611,7 +611,11 @@ function(core_find_git_rev stamp)
string(REPLACE "-" "" DATE ${DATE})
else()
string(TIMESTAMP DATE "%Y%m%d" UTC)
- set(HASH "nogitfound")
+ if(EXISTS ${CORE_SOURCE_DIR}/VERSION)
+ file(STRINGS ${CORE_SOURCE_DIR}/VERSION HASH LIMIT_INPUT 16)
+ else()
+ set(HASH "nogitfound")
+ endif()
endif()
cmake_parse_arguments(arg "FULL" "" "" ${ARGN})
if(arg_FULL)