summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Version.rc.cmake21
1 files changed, 17 insertions, 4 deletions
diff --git a/Version.rc.cmake b/Version.rc.cmake
index 84b97269..b297743f 100644
--- a/Version.rc.cmake
+++ b/Version.rc.cmake
@@ -1,8 +1,21 @@
#include <winresrc.h>
+#cmakedefine OCE_VERSION_PATCH
+#define OCE_VERSION_PATCH_VAL @OCE_VERSION_PATCH@
+
+/* If patch is not defined at project level, here is defined to 0 */
+#ifndef OCE_VERSION_PATCH
+#define OCE_VERSION_PATCH_VAL 0
+#endif
+
+/* Stringify OCE_VERSION_PATCH */
+#define QU(x) #x
+#define QUH(x) QU(x)
+#define OCE_VERSION_PATCH_STR QUH(OCE_VERSION_PATCH_VAL)
+
VS_VERSION_INFO VERSIONINFO
- FILEVERSION @OCE_VERSION_MAJOR@,@OCE_VERSION_MINOR@,@OCE_VERSION_PATCH@,0
- PRODUCTVERSION @OCE_VERSION_MAJOR@,@OCE_VERSION_MINOR@,@OCE_VERSION_PATCH@,0
+ FILEVERSION @OCE_VERSION_MAJOR@,@OCE_VERSION_MINOR@,OCE_VERSION_PATCH_VAL,0
+ PRODUCTVERSION @OCE_VERSION_MAJOR@,@OCE_VERSION_MINOR@,OCE_VERSION_PATCH_VAL,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifndef DEBUG
FILEFLAGS 0
@@ -30,12 +43,12 @@ VS_VERSION_INFO VERSIONINFO
BLOCK "04090000"
BEGIN
VALUE "FileDescription", "OpenCascade Community Edition"
- VALUE "FileVersion", "@OCE_VERSION_MAJOR@.@OCE_VERSION_MINOR@.@OCE_VERSION_PATCH@"
+ VALUE "FileVersion", "@OCE_VERSION_MAJOR@.@OCE_VERSION_MINOR@." OCE_VERSION_PATCH_STR
VALUE "InternalName", "@PROJECT_NAME@"
VALUE "LegalCopyright", ""
VALUE "OriginalFilename", ""
VALUE "ProductName", "@PROJECT_NAME@"
- VALUE "ProductVersion", "@OCE_VERSION_MAJOR@.@OCE_VERSION_MINOR@.@OCE_VERSION_PATCH@"
+ VALUE "ProductVersion", "@OCE_VERSION_MAJOR@.@OCE_VERSION_MINOR@." OCE_VERSION_PATCH_STR
END
END
BLOCK "VarFileInfo"