mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 03:15:11 +00:00
Generate libwebrtc.h file, move version definitions inside a CMake module
This commit is contained in:
parent
173d9150eb
commit
67d2b0bd4e
2 changed files with 33 additions and 20 deletions
|
|
@ -25,26 +25,7 @@ option(BUILD_SAMPLES "Build samples binaries" OFF)
|
||||||
set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass before compiling WebRTC")
|
set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass before compiling WebRTC")
|
||||||
|
|
||||||
include(LibWebRTCSubsystem)
|
include(LibWebRTCSubsystem)
|
||||||
|
include(LibWebRTCVersion)
|
||||||
#
|
|
||||||
# Versioning
|
|
||||||
#
|
|
||||||
|
|
||||||
set(LIBWEBRTC_MAJOR_VERSION 0)
|
|
||||||
set(LIBWEBRTC_MINOR_VERSION 0)
|
|
||||||
set(LIBWEBRTC_PATCH_VERSION 1)
|
|
||||||
set(LIBWEBRTC_BUILD_VERSION rc.4)
|
|
||||||
|
|
||||||
set(LIBWEBRTC_API_VERSION
|
|
||||||
"${LIBWEBRTC_MAJOR_VERSION}.${LIBWEBRTC_MINOR_VERSION}.${LIBWEBRTC_PATCH_VERSION}")
|
|
||||||
set(LIBWEBRTC_VERSION
|
|
||||||
${LIBWEBRTC_API_VERSION}-${LIBWEBRTC_BUILD_VERSION})
|
|
||||||
|
|
||||||
set(LIBWEBRTC_LIBRARY_PROPERTIES ${LIBWEBRTC_LIBRARY_PROPERTIES}
|
|
||||||
VERSION "${LIBWEBRTC_VERSION}"
|
|
||||||
SOVERSION "${LIBWEBRTC_API_VERSION}")
|
|
||||||
|
|
||||||
set(LIBWEBRTC_WEBRTC_REVISION ae2551232b5249e38298a50f2d9a64d3c862db00)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Directories
|
# Directories
|
||||||
|
|
|
||||||
32
CMakeModules/LibWebRTCVersion.cmake
Normal file
32
CMakeModules/LibWebRTCVersion.cmake
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
#
|
||||||
|
# Versioning
|
||||||
|
#
|
||||||
|
|
||||||
|
set(LIBWEBRTC_MAJOR_VERSION 0)
|
||||||
|
set(LIBWEBRTC_MINOR_VERSION 0)
|
||||||
|
set(LIBWEBRTC_PATCH_VERSION 1)
|
||||||
|
set(LIBWEBRTC_BUILD_VERSION rc.4)
|
||||||
|
|
||||||
|
set(LIBWEBRTC_API_VERSION
|
||||||
|
"${LIBWEBRTC_MAJOR_VERSION}.${LIBWEBRTC_MINOR_VERSION}.${LIBWEBRTC_PATCH_VERSION}")
|
||||||
|
set(LIBWEBRTC_VERSION
|
||||||
|
${LIBWEBRTC_API_VERSION}-${LIBWEBRTC_BUILD_VERSION})
|
||||||
|
|
||||||
|
set(LIBWEBRTC_LIBRARY_PROPERTIES ${LIBWEBRTC_LIBRARY_PROPERTIES}
|
||||||
|
VERSION "${LIBWEBRTC_VERSION}"
|
||||||
|
SOVERSION "${LIBWEBRTC_API_VERSION}")
|
||||||
|
|
||||||
|
set(LIBWEBRTC_WEBRTC_REVISION ae2551232b5249e38298a50f2d9a64d3c862db00)
|
||||||
|
|
||||||
|
file(WRITE ${CMAKE_BINARY_DIR}/libwebrtc.h "#ifndef LIBWEBRTC_H_
|
||||||
|
#define LIBWEBRTC_H_
|
||||||
|
|
||||||
|
#define LIBWEBRTC_MAJOR_VERSION \"${LIBWEBRTC_MAJOR_VERSION}\"
|
||||||
|
#define LIBWEBRTC_MINOR_VERSION \"${LIBWEBRTC_MINOR_VERSION}\"
|
||||||
|
#define LIBWEBRTC_PATCH_VERSION \"${LIBWEBRTC_PATCH_VERSION}\"
|
||||||
|
#define LIBWEBRTC_BUILD_VERSION \"${LIBWEBRTC_BUILD_VERSION}\"
|
||||||
|
#define LIBWEBRTC_WEBRTC_REVISION \"${LIBWEBRTC_WEBRTC_REVISION}\"
|
||||||
|
|
||||||
|
#endif /* LIBWEBRTC_H_ */
|
||||||
|
")
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue