CMakeLists: Allow specifying version suffix string

This commit is contained in:
tt2468 2021-08-30 02:50:02 -07:00
parent 292b2b0d3b
commit 1ecf2a4fdb
2 changed files with 10 additions and 1 deletions

View File

@ -15,6 +15,15 @@ endif()
unset(_LOC_PATH)
# Set correct version string
if(DEFINED OBS_WEBSOCKET_VERSION_SUFFIX)
set(OBS_WEBSOCKET_VERSION "${CMAKE_PROJECT_VERSION}${OBS_WEBSOCKET_VERSION_SUFFIX}")
message(WARNING "-----------------------------------\nVersion Suffix provided. OBS_WEBSOCKET_VERSION is now ${OBS_WEBSOCKET_VERSION}\n-----------------------------------")
else()
set(OBS_WEBSOCKET_VERSION "${CMAKE_PROJECT_VERSION}")
endif()
# Allow selection of common build types via UI
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING

View File

@ -21,7 +21,7 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#include <util/base.h>
#define blog(level, msg, ...) blog(level, "[obs-websocket] " msg, ##__VA_ARGS__)
#define OBS_WEBSOCKET_VERSION "@CMAKE_PROJECT_VERSION@"
#define OBS_WEBSOCKET_VERSION "@OBS_WEBSOCKET_VERSION@"
#define OBS_WEBSOCKET_RPC_VERSION @OBS_WEBSOCKET_RPC_VERSION@