UI: Automatically generate Windows file description

This defines the main OBS Windows executable with a resource file,
including a version number accessible externally and a File
description which appears in Windows Task Manager.
This commit is contained in:
Matt Gajownik
2019-01-29 22:10:20 +11:00
parent b5e656828f
commit 4b9d050b33
2 changed files with 36 additions and 0 deletions

View File

@@ -32,6 +32,16 @@ include(ObsHelpers)
include(ObsCpack)
include(GNUInstallDirs)
if(WIN32)
string(REPLACE "-" ";" UI_VERSION_SPLIT ${OBS_VERSION})
list(GET UI_VERSION_SPLIT 0 UI_VERSION)
string(REPLACE "." ";" UI_VERSION_SEMANTIC ${UI_VERSION})
list(GET UI_VERSION_SEMANTIC 0 UI_VERSION_MAJOR)
list(GET UI_VERSION_SEMANTIC 1 UI_VERSION_MINOR)
list(GET UI_VERSION_SEMANTIC 2 UI_VERSION_PATCH)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/UI/obs.rc.in ${CMAKE_CURRENT_SOURCE_DIR}/UI/obs.rc)
endif()
# Must be a string in the format of "x.x.x-rcx"
if(DEFINED RELEASE_CANDIDATE)
set(OBS_VERSION "${RELEASE_CANDIDATE}")