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)
|
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)
|
include (${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.cmake)
|
||||||
file (STRINGS "version" HYPERION_VERSION)
|
file (STRINGS "version" HYPERION_VERSION)
|
||||||
SetVersionNumber(HYPERION ${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.
|
# Instruct CMake to run moc automatically when needed.
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
"general" :
|
"general" :
|
||||||
{
|
{
|
||||||
"name" : "My Hyperion Config",
|
"name" : "My Hyperion Config",
|
||||||
"configVersion": "2.0.0-alpha.9",
|
"configVersion": "configVersionValue",
|
||||||
"previousVersion": "2.0.0-alpha.9",
|
"previousVersion": "previousVersionValue",
|
||||||
"watchedVersionBranch" : "Stable",
|
"watchedVersionBranch" : "Stable",
|
||||||
"showOptHelp" : true
|
"showOptHelp" : true
|
||||||
},
|
},
|
||||||
@ -96,7 +96,7 @@
|
|||||||
"framegrabber" :
|
"framegrabber" :
|
||||||
{
|
{
|
||||||
"device" : "auto",
|
"device" : "auto",
|
||||||
"input" : 0,
|
"input" : 0,
|
||||||
"width" : 80,
|
"width" : 80,
|
||||||
"height" : 45,
|
"height" : 45,
|
||||||
"fps" : 10,
|
"fps" : 10,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user