mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Write Hyperion version into default config on compiling.
This commit is contained in:
parent
da60a07b98
commit
a52965d6ed
@ -4,10 +4,15 @@ message( STATUS "CMake Version: ${CMAKE_VERSION}" )
|
||||
|
||||
PROJECT(hyperion)
|
||||
|
||||
# Parse semantic version of version file
|
||||
# Parse semantic version of version file and write version to config
|
||||
include (${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.cmake)
|
||||
file (STRINGS "version" HYPERION_VERSION)
|
||||
SetVersionNumber(HYPERION ${HYPERION_VERSION})
|
||||
set(DEFAULT_JSON_CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/config/hyperion.config.json.default)
|
||||
file(READ ${DEFAULT_JSON_CONFIG_FILE} DEFAULT_JSON_CONFIG_VAR)
|
||||
string(REPLACE "configVersionValue" ${HYPERION_VERSION} DEFAULT_JSON_CONFIG_VAR "${DEFAULT_JSON_CONFIG_VAR}")
|
||||
string(REPLACE "previousVersionValue" ${HYPERION_VERSION} DEFAULT_JSON_CONFIG_VAR "${DEFAULT_JSON_CONFIG_VAR}")
|
||||
file(WRITE ${DEFAULT_JSON_CONFIG_FILE} "${DEFAULT_JSON_CONFIG_VAR}")
|
||||
|
||||
# Instruct CMake to run moc automatically when needed.
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
@ -2,8 +2,8 @@
|
||||
"general" :
|
||||
{
|
||||
"name" : "My Hyperion Config",
|
||||
"configVersion": "2.0.0-alpha.9",
|
||||
"previousVersion": "2.0.0-alpha.9",
|
||||
"configVersion": "configVersionValue",
|
||||
"previousVersion": "previousVersionValue",
|
||||
"watchedVersionBranch" : "Stable",
|
||||
"showOptHelp" : true
|
||||
},
|
||||
@ -96,7 +96,7 @@
|
||||
"framegrabber" :
|
||||
{
|
||||
"device" : "auto",
|
||||
"input" : 0,
|
||||
"input" : 0,
|
||||
"width" : 80,
|
||||
"height" : 45,
|
||||
"fps" : 10,
|
||||
|
Loading…
x
Reference in New Issue
Block a user