aboutsummaryrefslogtreecommitdiffstats
path: root/main/bctoolbox/cmake-lib-version-fix.patch
blob: f2e88c34b16b7e4067d2c21894418951455d5958 (plain) (blame)
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
diff --git a/cmake/BcToolboxCMakeUtils.cmake b/cmake/BcToolboxCMakeUtils.cmake
index fd4894e..da8daf1 100644
--- a/cmake/BcToolboxCMakeUtils.cmake
+++ b/cmake/BcToolboxCMakeUtils.cmake
@@ -147,29 +147,7 @@ function(bc_parse_full_version version major minor patch)
 endfunction()
 
 function(bc_compute_lib_version OUTPUT_VERSION default_version)
-	find_program(GIT_EXECUTABLE git NAMES Git CMAKE_FIND_ROOT_PATH_BOTH)
-	if(GIT_EXECUTABLE)
-		execute_process(
-			COMMAND "${GIT_EXECUTABLE}" "describe"
-			OUTPUT_VARIABLE GIT_DESCRIBE_VERSION
-			OUTPUT_STRIP_TRAILING_WHITESPACE
-			ERROR_QUIET
-			WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-		)
-
-		# parse git describe version
-		if (NOT (GIT_DESCRIBE_VERSION MATCHES "^([0-9]+)[.]([0-9]+)[.]([0-9]+)(-alpha|-beta)?(-[0-9]+)?(-g[0-9a-f]+)?$"))
-			message(FATAL_ERROR "invalid git describe version: '${GIT_DESCRIBE_VERSION}'")
-			endif()
-		set(version_major ${CMAKE_MATCH_1})
-		set(version_minor ${CMAKE_MATCH_2})
-		set(version_patch ${CMAKE_MATCH_3})
-
-		# format lib version
-		set(${OUTPUT_VERSION} "${version_major}.${version_minor}.${version_patch}" CACHE STRING "")
-	else()
 		set(${OUTPUT_VERSION} "${default_version}" CACHE STRING "")
-	endif()
 endfunction()
 
 function(bc_compute_full_version OUTPUT_VERSION)