diff options
author | Bertrand Jacquin <bertrand@jacquin.bzh> | 2019-06-15 00:15:54 +0100 |
---|---|---|
committer | Bertrand Jacquin <bertrand@jacquin.bzh> | 2020-10-19 18:31:34 +0100 |
commit | e9da57769285e9a8a73ae3509cb85fcbe5ff1b29 (patch) | |
tree | 31b1158ba3ecf0ca66a9fc26e0996c453ecfd2ec | |
parent | Drop in-tree miniupnpc (diff) | |
download | monero-e9da57769285e9a8a73ae3509cb85fcbe5ff1b29.tar.xz |
Use gentoo versioning
-rw-r--r-- | cmake/Version.cmake | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/cmake/Version.cmake b/cmake/Version.cmake index 707d72639..e6386339d 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -31,20 +31,8 @@ function (write_version tag) configure_file("${CMAKE_CURRENT_LIST_DIR}/../src/version.cpp.in" "${CMAKE_BINARY_DIR}/version.cpp") endfunction () -find_package(Git QUIET) -if ("$Format:$" STREQUAL "") - # We're in a tarball; use hard-coded variables. - set(VERSION_IS_RELEASE "true") - write_version("release") -elseif (GIT_FOUND OR Git_FOUND) - message(STATUS "Found Git: ${GIT_EXECUTABLE}") - include(GitVersion) - get_version_tag_from_git("${GIT_EXECUTABLE}") - write_version("${VERSIONTAG}") -else() - message(STATUS "WARNING: Git was not found!") - set(VERSION_IS_RELEASE "false") - write_version("unknown") -endif () +set(VERSION_IS_RELEASE "true") +write_version("release") + add_custom_target(genversion ALL DEPENDS "${CMAKE_BINARY_DIR}/version.cpp") |