diff options
author | Martijn Kaijser <martijn@xbmc.org> | 2017-10-14 12:56:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-14 12:56:27 +0200 |
commit | 2852c5e09f1e809a9e625cb05921813f5f9a6507 (patch) | |
tree | 2d73372943a6cf4e0b907d0e5df66a70a45aab7e | |
parent | 857c640bc632d86bb3ecc949ad2a13912f240911 (diff) | |
parent | f0f1b74cedc869a9b30788fc13aa2233e23166bc (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.cmake | 6 |
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) |