diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index ea32106b..325a4a72 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -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) diff --git a/expat/Makefile.am b/expat/Makefile.am index 37ae3738..b071fcfe 100644 --- a/expat/Makefile.am +++ b/expat/Makefile.am @@ -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) \ diff --git a/expat/win32/.gitignore b/expat/win32/.gitignore index e7546777..8c01fe20 100644 --- a/expat/win32/.gitignore +++ b/expat/win32/.gitignore @@ -8,3 +8,4 @@ expat.PR expat.PRI expat.PS expat.WK3 +version.rc diff --git a/expat/win32/expat.iss b/expat/win32/expat.iss index ce9f3bb6..4116aa5b 100644 --- a/expat/win32/expat.iss +++ b/expat/win32/expat.iss @@ -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" diff --git a/expat/win32/version.rc b/expat/win32/version.rc.cmake similarity index 69% rename from expat/win32/version.rc rename to expat/win32/version.rc.cmake index 64a4dadf..4b883f37 100644 --- a/expat/win32/version.rc +++ b/expat/win32/version.rc.cmake @@ -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"