From 4af68a70d1e5cb6e843435356d7b20c1c0d64213 Mon Sep 17 00:00:00 2001
From: Marek Roszko <mark.roszko@gmail.com>
Date: Thu, 14 Sep 2023 20:19:11 -0400
Subject: [PATCH] Manifest kicommon on msvc

---
 common/CMakeLists.txt         | 4 ++++
 resources/msw/kicommon-dll.rc | 4 ++++
 2 files changed, 8 insertions(+)
 create mode 100644 resources/msw/kicommon-dll.rc

diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index ce7897a129..cbd75b6e9a 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -111,6 +111,10 @@ target_include_directories( kicommon
 
 add_dependencies( kicommon pegtl )
 
+if( MSVC )
+    target_sources( kicommon PRIVATE ${CMAKE_SOURCE_DIR}/resources/msw/kicommon-dll.rc )
+endif()
+
 # The build version string defaults to the value in the KiCadVersion.cmake file.
 # If being built inside a git repository, the git tag and commit hash are used to create
 # a new version string instead. The user can supply an additional string to be appended
diff --git a/resources/msw/kicommon-dll.rc b/resources/msw/kicommon-dll.rc
new file mode 100644
index 0000000000..f2091831c3
--- /dev/null
+++ b/resources/msw/kicommon-dll.rc
@@ -0,0 +1,4 @@
+#define RC_VER_FILE_DESCRIPTION "KiCad Common " KICAD_WIN32_RC_PRODVER_STR
+#define RC_VER_INTERNALNAME "kicommon.dll"
+#define RC_VER_ORIGINALFILENAME "kicommon.dll"
+#include "kiwin32-dll.rc"