diff options
Diffstat (limited to 'cmake/Version.cmake')
-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..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") |