mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 03:15:11 +00:00
Define the library's version correctly
This commit is contained in:
parent
c32eded15c
commit
5ec1c72cf9
1 changed files with 28 additions and 0 deletions
|
|
@ -9,6 +9,34 @@ find_package(DepotTools REQUIRED)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
|
||||||
|
#
|
||||||
|
# Versioning
|
||||||
|
#
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND git log -1 --format=%h
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
|
OUTPUT_VARIABLE GIT_COMMIT_HASH
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
set(LIBWEBRTC_MAJOR_VERSION 1)
|
||||||
|
set(LIBWEBRTC_MINOR_VERSION 0)
|
||||||
|
set(LIBWEBRTC_PATCH_VERSION 0)
|
||||||
|
set(LIBWEBRTC_BUILD_VERSION ${GIT_COMMIT_HASH})
|
||||||
|
set(LIBWEBRTC_VERSION
|
||||||
|
${LIBWEBRTC_MAJOR_VERSION}.${LIBWEBRTC_MINOR_VERSION}.${LIBWEBRTC_PATCH_VERSION}-${LIBWEBRTC_BUILD_VERSION}
|
||||||
|
)
|
||||||
|
|
||||||
|
set(LIBWEBRTC_API_VERSION
|
||||||
|
"${LIBWEBRTC_MAJOR_VERSION}.${LIBWEBRTC_MINOR_VERSION}.${LIBWEBRTC_PATCH_VERSION}"
|
||||||
|
)
|
||||||
|
|
||||||
|
set(LIBWEBRTC_LIBRARY_PROPERTIES ${LIBWEBRTC_LIBRARY_PROPERTIES}
|
||||||
|
VERSION "${LIBWEBRTC_VERSION}"
|
||||||
|
SOVERSION "${LIBWEBRTC_API_VERSION}"
|
||||||
|
)
|
||||||
|
|
||||||
set(WEBRTC_CHROMIUM_DEPS git@github.com:aisouard/libwebrtc-chromium-deps.git)
|
set(WEBRTC_CHROMIUM_DEPS git@github.com:aisouard/libwebrtc-chromium-deps.git)
|
||||||
|
|
||||||
add_subdirectory(Targets)
|
add_subdirectory(Targets)
|
||||||
Loading…
Add table
Reference in a new issue