Fix version number in the generated Windows resource

This commit is contained in:
Nadia Holmquist Pedersen 2024-11-21 01:10:13 +01:00
parent 98ceadd44c
commit e3fa6f4224
3 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,7 @@ if (USE_VCPKG)
endif() endif()
project(melonDS project(melonDS
VERSION 1.0.0 VERSION 1.0
DESCRIPTION "DS emulator, sorta" DESCRIPTION "DS emulator, sorta"
HOMEPAGE_URL "https://melonds.kuribo64.net" HOMEPAGE_URL "https://melonds.kuribo64.net"
LANGUAGES C CXX) LANGUAGES C CXX)

View File

@ -6,8 +6,8 @@
//include version information in .exe, modify these values to match your needs //include version information in .exe, modify these values to match your needs
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION ${melonDS_VERSION_MAJOR},${melonDS_VERSION_MINOR},${melonDS_VERSION_PATCH},0 FILEVERSION ${MELON_RC_VERSION}
PRODUCTVERSION ${melonDS_VERSION_MAJOR},${melonDS_VERSION_MINOR},${melonDS_VERSION_PATCH},0 PRODUCTVERSION ${MELON_RC_VERSION}
FILETYPE VFT_APP FILETYPE VFT_APP
{ {
BLOCK "StringFileInfo" BLOCK "StringFileInfo"

View File

@ -190,6 +190,7 @@ if (WIN32)
target_compile_definitions(melonDS PRIVATE WIN32_PORTABLE) target_compile_definitions(melonDS PRIVATE WIN32_PORTABLE)
endif() endif()
string(REPLACE . , MELON_RC_VERSION ${melonDS_VERSION})
configure_file("${CMAKE_SOURCE_DIR}/res/melon.rc.in" "${CMAKE_BINARY_DIR}/res/melon.rc") configure_file("${CMAKE_SOURCE_DIR}/res/melon.rc.in" "${CMAKE_BINARY_DIR}/res/melon.rc")
target_sources(melonDS PUBLIC "${CMAKE_BINARY_DIR}/res/melon.rc") target_sources(melonDS PUBLIC "${CMAKE_BINARY_DIR}/res/melon.rc")
target_include_directories(melonDS PRIVATE "${CMAKE_BINARY_DIR}/res") target_include_directories(melonDS PRIVATE "${CMAKE_BINARY_DIR}/res")