diff --git a/CMakeLists.txt b/CMakeLists.txt
index cbf348ad..d1a8ac60 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,6 +73,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
set(WARNING_FLAGS "${WARNING_FLAGS} -Werror=switch")
endif()
+if(WIN32)
+ set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} -l0")
+endif()
+
if(MINGW)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
diff --git a/cmake/MacOSXBundleInfo.plist.in b/cmake/MacOSXBundleInfo.plist.in
index c215c443..1dfa6d71 100644
--- a/cmake/MacOSXBundleInfo.plist.in
+++ b/cmake/MacOSXBundleInfo.plist.in
@@ -13,11 +13,11 @@
CFBundlePackageType
APPL
CFBundleVersion
- ${solvespace_VERSION_MAJOR}.${solvespace_VERSION_MINOR}
+ ${solvespace_VERSION_MAJOR}.${solvespace_VERSION_MINOR}~${solvespace_GIT_HASH}
CFBundleShortVersionString
${solvespace_VERSION_MAJOR}.${solvespace_VERSION_MINOR}
NSHumanReadableCopyright
- © 2008-2015 Jonathan Westhues and other authors
+ © 2008-2016 Jonathan Westhues and other authors
NSPrincipalClass
NSApplication
NSMainNibFile
diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt
index 8b864ba5..3093b4b8 100644
--- a/res/CMakeLists.txt
+++ b/res/CMakeLists.txt
@@ -2,8 +2,12 @@
set(resource_root ${CMAKE_CURRENT_SOURCE_DIR}/)
set(resource_list)
if(WIN32)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/win32/versioninfo.rc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/win32/versioninfo.rc)
+
set(rc_file ${CMAKE_CURRENT_BINARY_DIR}/resources.rc)
file(WRITE ${rc_file} "// Autogenerated; do not edit\n#include\n")
+ file(WRITE ${rc_file} "#include \"${CMAKE_CURRENT_BINARY_DIR}/win32/versioninfo.rc\"\n")
function(add_resource name)
set(source ${CMAKE_CURRENT_SOURCE_DIR}/${name})
diff --git a/res/win32/versioninfo.rc.in b/res/win32/versioninfo.rc.in
new file mode 100644
index 00000000..f6daf9aa
--- /dev/null
+++ b/res/win32/versioninfo.rc.in
@@ -0,0 +1,32 @@
+#define VOS_NT_WINDOWS32 0x00040004L
+#define VFT_APP 0x00000001L
+
+1 VERSIONINFO
+FILEVERSION ${solvespace_VERSION_MAJOR},${solvespace_VERSION_MINOR},0,0
+PRODUCTVERSION ${solvespace_VERSION_MAJOR},${solvespace_VERSION_MINOR},0,0
+FILEFLAGSMASK 0
+FILEFLAGS 0
+FILEOS VOS_NT_WINDOWS32
+FILETYPE VFT_APP
+FILESUBTYPE 0
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "04090000"
+ BEGIN
+ VALUE "CompanyName", "The SolveSpace authors"
+ VALUE "ProductName", "SolveSpace"
+ VALUE "ProductVersion", "${solvespace_VERSION_MAJOR}.${solvespace_VERSION_MINOR}~${solvespace_GIT_HASH}"
+ VALUE "FileDescription", "SolveSpace, a parametric 2d/3d CAD"
+ VALUE "FileVersion", "${solvespace_VERSION_MAJOR}.${solvespace_VERSION_MINOR}~${solvespace_GIT_HASH}"
+ VALUE "OriginalFilename", "solvespace.exe"
+ VALUE "InternalName", "solvespace"
+ VALUE "LegalCopyright", "(c) 2008-2016 Jonathan Westhues and other authors"
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 0
+ END
+END