mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-19 20:32:15 +02:00
cmake/libobs: Only set beta/rc increment
This commit is contained in:
parent
82864559f2
commit
e11ffeccb0
@ -51,8 +51,8 @@ set(OBS_CMAKE_VERSION 3.0.0)
|
||||
|
||||
# Configure default version strings
|
||||
set(_obs_default_version "0" "0" "1")
|
||||
set(_obs_release_candidate "0" "0" "0" "0")
|
||||
set(_obs_beta "0" "0" "0" "0")
|
||||
set(_obs_release_candidate 0)
|
||||
set(_obs_beta 0)
|
||||
|
||||
# Add common module directories to default search path
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/common" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/finders")
|
||||
|
@ -33,23 +33,17 @@ endif()
|
||||
|
||||
# Set beta/rc versions if suffix included in version string
|
||||
if(_obs_version MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+-rc[0-9]+")
|
||||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)-rc([0-9]+).*$" "\\1;\\2;\\3;\\4" _obs_release_candidate
|
||||
${_obs_version})
|
||||
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.[0-9]+-rc([0-9]+).*$" "\\1" _obs_release_candidate ${_obs_version})
|
||||
elseif(_obs_version MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+-beta[0-9]+")
|
||||
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)-beta([0-9]+).*$" "\\1;\\2;\\3;\\4" _obs_beta ${_obs_version})
|
||||
string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.[0-9]+-beta([0-9]+).*$" "\\1" _obs_beta ${_obs_version})
|
||||
endif()
|
||||
|
||||
list(GET _obs_version_canonical 0 OBS_VERSION_MAJOR)
|
||||
list(GET _obs_version_canonical 1 OBS_VERSION_MINOR)
|
||||
list(GET _obs_version_canonical 2 OBS_VERSION_PATCH)
|
||||
list(GET _obs_release_candidate 0 OBS_RELEASE_CANDIDATE_MAJOR)
|
||||
list(GET _obs_release_candidate 1 OBS_RELEASE_CANDIDATE_MINOR)
|
||||
list(GET _obs_release_candidate 2 OBS_RELEASE_CANDIDATE_PATCH)
|
||||
list(GET _obs_release_candidate 3 OBS_RELEASE_CANDIDATE)
|
||||
list(GET _obs_beta 0 OBS_BETA_MAJOR)
|
||||
list(GET _obs_beta 1 OBS_BETA_MINOR)
|
||||
list(GET _obs_beta 2 OBS_BETA_PATCH)
|
||||
list(GET _obs_beta 3 OBS_BETA)
|
||||
|
||||
set(OBS_RELEASE_CANDIDATE ${_obs_release_candidate})
|
||||
set(OBS_BETA ${_obs_beta})
|
||||
|
||||
string(REPLACE ";" "." OBS_VERSION_CANONICAL "${_obs_version_canonical}")
|
||||
string(REPLACE ";" "." OBS_VERSION "${_obs_version}")
|
||||
|
@ -58,15 +58,7 @@
|
||||
#define OBS_INSTALL_PREFIX ""
|
||||
#define OBS_PLUGIN_DESTINATION "obs-plugins"
|
||||
#define OBS_RELATIVE_PREFIX "../../"
|
||||
#define OBS_RELEASE_CANDIDATE_MAJOR 0
|
||||
#define OBS_RELEASE_CANDIDATE_MINOR 0
|
||||
#define OBS_RELEASE_CANDIDATE_PATCH 0
|
||||
#define OBS_RELEASE_CANDIDATE_VER 0
|
||||
#define OBS_RELEASE_CANDIDATE 0
|
||||
#define OBS_BETA_MAJOR 0
|
||||
#define OBS_BETA_MINOR 0
|
||||
#define OBS_BETA_PATCH 0
|
||||
#define OBS_BETA_VER 0
|
||||
#define OBS_BETA 0
|
||||
#endif
|
||||
|
||||
|
@ -9,29 +9,5 @@
|
||||
#cmakedefine XCB_XINPUT_FOUND
|
||||
#cmakedefine ENABLE_WAYLAND
|
||||
|
||||
/* NOTE: Release candidate version numbers internally are always the previous
|
||||
* main release number! For example, if the current public release is 21.0 and
|
||||
* the build is 22.0 release candidate 1, internally the build number (defined
|
||||
* by LIBOBS_API_VER/etc) will always be 21.0, despite the OBS_VERSION string
|
||||
* saying "22.0 RC1".
|
||||
*
|
||||
* If the release candidate version number is 0.0.0 and the RC number is 0,
|
||||
* that means it's not a release candidate build. */
|
||||
#define OBS_RELEASE_CANDIDATE_MAJOR @OBS_RELEASE_CANDIDATE_MAJOR@
|
||||
#define OBS_RELEASE_CANDIDATE_MINOR @OBS_RELEASE_CANDIDATE_MINOR@
|
||||
#define OBS_RELEASE_CANDIDATE_PATCH @OBS_RELEASE_CANDIDATE_PATCH@
|
||||
#define OBS_RELEASE_CANDIDATE_VER \
|
||||
MAKE_SEMANTIC_VERSION(OBS_RELEASE_CANDIDATE_MAJOR, \
|
||||
OBS_RELEASE_CANDIDATE_MINOR, \
|
||||
OBS_RELEASE_CANDIDATE_PATCH)
|
||||
#define OBS_RELEASE_CANDIDATE @OBS_RELEASE_CANDIDATE@
|
||||
|
||||
/* Same thing for beta builds */
|
||||
#define OBS_BETA_MAJOR @OBS_BETA_MAJOR@
|
||||
#define OBS_BETA_MINOR @OBS_BETA_MINOR@
|
||||
#define OBS_BETA_PATCH @OBS_BETA_PATCH@
|
||||
#define OBS_BETA_VER \
|
||||
MAKE_SEMANTIC_VERSION(OBS_BETA_MAJOR, \
|
||||
OBS_BETA_MINOR, \
|
||||
OBS_BETA_PATCH)
|
||||
#define OBS_BETA @OBS_BETA@
|
||||
|
Loading…
Reference in New Issue
Block a user