diff options
author | Bertrand Jacquin <bertrand@jacquin.bzh> | 2019-06-15 00:15:54 +0100 |
---|---|---|
committer | Bertrand Jacquin <bertrand@jacquin.bzh> | 2019-07-22 23:26:22 +0100 |
commit | 9b782e9ba4c576367f50a336f15e81b1b79cb392 (patch) | |
tree | 583e880d79d2c97694ac71de70c5792458726016 | |
parent | Drop in-tree miniupnpc (diff) | |
download | monero-9b782e9ba4c576367f50a336f15e81b1b79cb392.tar.xz |
Use gentoo versioning
-rw-r--r-- | cmake/Version.cmake | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/cmake/Version.cmake b/cmake/Version.cmake index 632c1431c..957202469 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -31,22 +31,7 @@ function (write_static_version_header hash) configure_file("${CMAKE_SOURCE_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. - write_static_version_header("release") -elseif (GIT_FOUND OR Git_FOUND) - message(STATUS "Found Git: ${GIT_EXECUTABLE}") - add_custom_command( - OUTPUT "${CMAKE_BINARY_DIR}/version.cpp" - COMMAND "${CMAKE_COMMAND}" - "-D" "GIT=${GIT_EXECUTABLE}" - "-D" "TO=${CMAKE_BINARY_DIR}/version.cpp" - "-P" "cmake/GenVersion.cmake" - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}") -else() - message(STATUS "WARNING: Git was not found!") - write_static_version_header("unknown") -endif () +write_static_version_header("release") + add_custom_target(genversion ALL DEPENDS "${CMAKE_BINARY_DIR}/version.cpp") |