summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Barbier <bouzim@gmail.com>2012-04-28 13:31:17 -0700
committerDenis Barbier <bouzim@gmail.com>2012-04-28 13:31:17 -0700
commit3d508ec3d72e685f2a73c553a5aabb5fc079fc98 (patch)
tree6b35ce41a38df1d3690fb0017448db1adf28c847
parent343040bf7ee579aedf3ecda7fd3d0af75c4c5154 (diff)
parentaa1ce8e235ec0d70c04b8b9707108e13614aaa2c (diff)
downloadoce-master.tar.gz
oce-master.zip
Merge pull request #264 from tpaviot/review/fix-msvc-buildHEADmaster
Fix for MSVC build : support non-defined OCE_VERSION_PATCH in RC file
-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"