diff --git a/cmake/common/bootstrap.cmake b/cmake/common/bootstrap.cmake index 9ac851368..d081fe5bf 100644 --- a/cmake/common/bootstrap.cmake +++ b/cmake/common/bootstrap.cmake @@ -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") diff --git a/cmake/common/versionconfig.cmake b/cmake/common/versionconfig.cmake index a6370d697..c1ddb56c3 100644 --- a/cmake/common/versionconfig.cmake +++ b/cmake/common/versionconfig.cmake @@ -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}") diff --git a/libobs/obs-config.h b/libobs/obs-config.h index 7eaa36772..b0e80d41c 100644 --- a/libobs/obs-config.h +++ b/libobs/obs-config.h @@ -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 diff --git a/libobs/obsconfig.h.in b/libobs/obsconfig.h.in index b4de06623..2a7c87df8 100644 --- a/libobs/obsconfig.h.in +++ b/libobs/obsconfig.h.in @@ -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@