mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 03:15:11 +00:00
Build version from current tag
This commit is contained in:
parent
5cda935434
commit
1bed0a6818
1 changed files with 18 additions and 5 deletions
|
|
@ -1,10 +1,23 @@
|
||||||
set(LIBWEBRTC_MAJOR_VERSION 0)
|
include(LibWebRTCExecute)
|
||||||
set(LIBWEBRTC_MINOR_VERSION 0)
|
|
||||||
set(LIBWEBRTC_PATCH_VERSION 1)
|
libwebrtc_execute(
|
||||||
set(LIBWEBRTC_BUILD_VERSION -rc.4)
|
COMMAND ${GIT_EXECUTABLE} describe --tags --dirty=-dirty
|
||||||
set(LIBWEBRTC_WEBRTC_HEAD refs/branch-heads/57)
|
OUTPUT_VARIABLE _LIBWEBRTC_TAG
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
STAMPFILE webrtc-current-tag
|
||||||
|
STATUS "Retrieving current git tag"
|
||||||
|
ERROR "Unable to retrieve the current git tag"
|
||||||
|
)
|
||||||
|
string(STRIP ${_LIBWEBRTC_TAG} _LIBWEBRTC_TAG)
|
||||||
|
|
||||||
|
string(REGEX REPLACE "^v?([0-9]+)\\..*" "\\1" LIBWEBRTC_MAJOR_VERSION "${_LIBWEBRTC_TAG}")
|
||||||
|
string(REGEX REPLACE "^v?[0-9]+\\.([0-9]+).*" "\\1" LIBWEBRTC_MINOR_VERSION "${_LIBWEBRTC_TAG}")
|
||||||
|
string(REGEX REPLACE "^v?[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" LIBWEBRTC_PATCH_VERSION "${_LIBWEBRTC_TAG}")
|
||||||
|
string(REGEX REPLACE "^v?[0-9]+\\.[0-9]+\\.[0-9]+(.*)" "\\1" LIBWEBRTC_BUILD_VERSION "${_LIBWEBRTC_TAG}")
|
||||||
|
|
||||||
set(LIBWEBRTC_API_VERSION
|
set(LIBWEBRTC_API_VERSION
|
||||||
"${LIBWEBRTC_MAJOR_VERSION}.${LIBWEBRTC_MINOR_VERSION}.${LIBWEBRTC_PATCH_VERSION}")
|
"${LIBWEBRTC_MAJOR_VERSION}.${LIBWEBRTC_MINOR_VERSION}.${LIBWEBRTC_PATCH_VERSION}")
|
||||||
set(LIBWEBRTC_VERSION
|
set(LIBWEBRTC_VERSION
|
||||||
${LIBWEBRTC_API_VERSION}${LIBWEBRTC_BUILD_VERSION})
|
${LIBWEBRTC_API_VERSION}${LIBWEBRTC_BUILD_VERSION})
|
||||||
|
|
||||||
|
set(LIBWEBRTC_WEBRTC_HEAD refs/branch-heads/57)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue