blob: c37943e21c1555367c77d9497870f0e27383d138 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
diff --git a/cmake/git.cmake b/cmake/git.cmake
index 4718b8e..c2c594d 100644
--- a/cmake/git.cmake
+++ b/cmake/git.cmake
@@ -1,39 +1,6 @@
# --- extract version from Git
-set(PROJECT_MAJOR 0)
-set(PROJECT_MINOR 0)
-set(PROJECT_PATCH 0)
-set(PROJECT_VERSION 0.0.0)
-find_program(GIT_VERSION_GEN NAMES git-version-gen
- PATHS ${PROJECT_SOURCE_DIR}/build-aux NO_DEFAULT_PATH)
-if(GIT_VERSION_GEN)
- execute_process(COMMAND ${GIT_VERSION_GEN} .tarball-version
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- RESULT_VARIABLE _err
- OUTPUT_VARIABLE git_version
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif()
-if(_err EQUAL 0)
- if(git_version MATCHES
- "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.].*")
- set(PROJECT_MAJOR "${CMAKE_MATCH_1}")
- set(PROJECT_MINOR "${CMAKE_MATCH_2}")
- set(PROJECT_PATCH "${CMAKE_MATCH_3}")
- set(PROJECT_VERSION ${PROJECT_MAJOR}.${PROJECT_MINOR}.${PROJECT_PATCH}.999)
- elseif(git_version MATCHES
- "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)")
- set(PROJECT_MAJOR "${CMAKE_MATCH_1}")
- set(PROJECT_MINOR "${CMAKE_MATCH_2}")
- set(PROJECT_PATCH "${CMAKE_MATCH_3}")
- set(PROJECT_VERSION ${PROJECT_MAJOR}.${PROJECT_MINOR}.${PROJECT_PATCH})
- elseif(git_version MATCHES
- "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)")
- set(PROJECT_MAJOR "${CMAKE_MATCH_1}")
- set(PROJECT_MINOR "${CMAKE_MATCH_2}")
- set(PROJECT_VERSION ${PROJECT_MAJOR}.${PROJECT_MINOR})
- elseif(git_version MATCHES
- "^(0|[1-9][0-9]*)")
- set(PROJECT_MAJOR "${CMAKE_MATCH_1}")
- set(PROJECT_VERSION ${PROJECT_MAJOR})
- endif()
-endif()
+set(PROJECT_MAJOR 2)
+set(PROJECT_MINOR 8)
+set(PROJECT_PATCH 6)
+set(PROJECT_VERSION 2.8.6)
|