aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2019-06-15 00:15:54 +0100
committerBertrand Jacquin <bertrand@jacquin.bzh>2019-06-15 00:25:38 +0100
commit777b5fb5c1128b54a008b47bd637cb93fe1253b4 (patch)
tree50a907e79ad032e8629a9acc3dc2a850cb67dce3
parentDrop in-tree miniupnpc (diff)
downloadmonero-777b5fb5c1128b54a008b47bd637cb93fe1253b4.tar.xz
Use gentoo versioning
-rw-r--r--cmake/Version.cmake19
1 files changed, 2 insertions, 17 deletions
diff --git a/cmake/Version.cmake b/cmake/Version.cmake
index 632c1431c..5aaa404b9 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($ENV{PVR})
+
add_custom_target(genversion ALL
DEPENDS "${CMAKE_BINARY_DIR}/version.cpp")