aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-10-21 13:52:24 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2014-10-23 16:42:34 -0400
commiteba180a1c786c4a86ead7e46f6e19febef4dd940 (patch)
treed02cef7ce4a390acc2b2854622563d881aedb991 /CMakeLists.txt
parentcmake: fix up BOOST_IGNORE_SYSTEM_PATHS (diff)
downloadmonero-eba180a1c786c4a86ead7e46f6e19febef4dd940.tar.xz
cmake: support git info in released tarballs
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 1 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac5cc395a..bdb347191 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -228,17 +228,7 @@ elseif(NOT MSVC)
set(EXTRA_LIBRARIES ${RT} ${PTHREAD} ${DL})
endif()
-file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/version")
-find_package(Git QUIET)
-if(Git_FOUND OR GIT_FOUND)
- message(STATUS "Found Git: ${GIT_EXECUTABLE}")
- add_custom_target(version ALL "${CMAKE_COMMAND}" "-D" "GIT=${GIT_EXECUTABLE}" "-D" "TO=${CMAKE_BINARY_DIR}/version/version.h" "-P" "src/version.cmake" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}")
-else()
- message(STATUS "WARNING: Git was not found!")
- set(VERSIONTAG "unknown")
- configure_file("src/version.h.in" "version/version.h")
- add_custom_target(version ALL)
-endif()
+include(version.cmake)
add_subdirectory(src)
add_subdirectory(tests)