Set Steam DLL version from EnderalVersion.ini
This commit is contained in:
parent
cec66bb5c7
commit
512842bfa5
@ -4,9 +4,19 @@ cmake_minimum_required(VERSION 3.21)
|
|||||||
## Define project
|
## Define project
|
||||||
########################################################################################################################
|
########################################################################################################################
|
||||||
|
|
||||||
|
# Get current version
|
||||||
|
set(ENDERAL_VERSION_INI "${CMAKE_CURRENT_SOURCE_DIR}/../../SKSE/Plugins/EnderalVersion.ini")
|
||||||
|
file(READ "${ENDERAL_VERSION_INI}" CONFIG_CONTENT)
|
||||||
|
string(REGEX MATCH "version[ \t]*=[ \t]*([0-9.]+)" _ ${CONFIG_CONTENT})
|
||||||
|
set(VERSION_NUMBER "${CMAKE_MATCH_1}")
|
||||||
|
|
||||||
|
# file(READ) does not register a dependency: without this, bumping the version in
|
||||||
|
# the INI would not re-run CMake and the DLL would keep the previous version.
|
||||||
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${ENDERAL_VERSION_INI}")
|
||||||
|
|
||||||
project(
|
project(
|
||||||
EnderalSteam
|
EnderalSteam
|
||||||
VERSION 2.1.4
|
VERSION ${VERSION_NUMBER}
|
||||||
DESCRIPTION "Enderal SE Steam Support"
|
DESCRIPTION "Enderal SE Steam Support"
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
@ -15,7 +25,7 @@ project(
|
|||||||
set(PROJECT_FRIENDLY_NAME "Enderal SE")
|
set(PROJECT_FRIENDLY_NAME "Enderal SE")
|
||||||
|
|
||||||
# The binary FILEVERSION/PRODUCTVERSION fields need all four components;
|
# The binary FILEVERSION/PRODUCTVERSION fields need all four components;
|
||||||
# PROJECT_VERSION_TWEAK is empty when the version above carries only three.
|
# PROJECT_VERSION_TWEAK is empty when the INI carries only three.
|
||||||
if(NOT PROJECT_VERSION_TWEAK)
|
if(NOT PROJECT_VERSION_TWEAK)
|
||||||
set(PROJECT_VERSION_TWEAK 0)
|
set(PROJECT_VERSION_TWEAK 0)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user