win32|cmake: Fix FileVersion and ProductVersion in DLL version info

Before: {'FileVersion': 'VER_FILEVERSION', 'ProductVersion': 'VER_FILEVERSION'}
After: {'FileVersion': '2.5.0.0', 'ProductVersion': '2.5.0.0'}

Thanks to @spookyahell for helpful gist "exe2version_info.py":
https://gist.github.com/spookyahell/b317bdf0712aac5fd37dd79f70bfbe69
This commit is contained in:
Sebastian Pipping 2023-11-03 21:46:38 +01:00
parent d4e0eeb77b
commit 781269f4a8
5 changed files with 7 additions and 5 deletions

View file

@ -403,7 +403,8 @@ if(EXPAT_SHARED_LIBS)
# Add DLL version
string(REPLACE "." "," _EXPAT_DLL_VERSION ${PROJECT_VERSION}.0)
set(_EXPAT_EXTRA_SOURCES ${_EXPAT_EXTRA_SOURCES} win32/version.rc)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/win32/version.rc.cmake" "${CMAKE_CURRENT_BINARY_DIR}/win32/version.rc")
set(_EXPAT_EXTRA_SOURCES ${_EXPAT_EXTRA_SOURCES} "${CMAKE_CURRENT_BINARY_DIR}/win32/version.rc")
endif()
else()
set(_SHARED STATIC)

View file

@ -84,7 +84,7 @@ _EXTRA_DIST_WINDOWS = \
win32/expat.iss \
win32/MANIFEST.txt \
win32/README.txt \
win32/version.rc
win32/version.rc.cmake
EXTRA_DIST = \
$(_EXTRA_DIST_CMAKE) \

View file

@ -8,3 +8,4 @@ expat.PR
expat.PRI
expat.PS
expat.WK3
version.rc

View file

@ -77,7 +77,7 @@ Flags: ignoreversion; Source: doc\*.css; DestDir: "{app}\Doc"
Flags: ignoreversion; Source: doc\*.xml; DestDir: "{app}\Doc"
Flags: ignoreversion; Source: win32\bin\Release\*.dll; DestDir: "{app}\Bin"
Flags: ignoreversion; Source: win32\bin\Release\*.lib; DestDir: "{app}\Bin"
Flags: ignoreversion; Source: win32\version.rc; DestDir: "{app}\Source\win32"
Flags: ignoreversion; Source: win32\version.rc.cmake; DestDir: "{app}\Source\win32"
Flags: ignoreversion; Source: win32\README.txt; DestDir: "{app}\Source"
Flags: ignoreversion; Source: AUTHORS; DestDir: "{app}\Source"
Flags: ignoreversion; Source: Changes; DestDir: "{app}\Source"

View file

@ -6,8 +6,8 @@ BEGIN
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileVersion", "VER_FILEVERSION"
VALUE "ProductVersion", "VER_FILEVERSION"
VALUE "FileVersion", "${PROJECT_VERSION}.0"
VALUE "ProductVersion", "${PROJECT_VERSION}.0"
END
END
BLOCK "VarFileInfo"