diff --git a/configure.ac b/configure.ac
index d2d06c0..d1442dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,7 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign])
# Initialize libtool.
LT_PREREQ([2.2.0])
LT_INIT([win32-dll])
+LT_PROG_RC
# Checks for programs.
AC_PROG_CC
@@ -67,6 +68,7 @@ AC_CONFIG_FILES([
Makefile
src/Makefile
src/version.h
+ src/libdivecomputer.rc
examples/Makefile
])
AC_OUTPUT
diff --git a/msvc/libdivecomputer.vcproj b/msvc/libdivecomputer.vcproj
index 9aa9f69..56cf40e 100644
--- a/msvc/libdivecomputer.vcproj
+++ b/msvc/libdivecomputer.vcproj
@@ -532,6 +532,10 @@
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
+
+
diff --git a/src/Makefile.am b/src/Makefile.am
index bf7e293..67fc6de 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -101,10 +101,17 @@ else
libdivecomputer_la_SOURCES += irda.h irda_dummy.c
endif
+if OS_WIN32
+libdivecomputer_la_SOURCES += libdivecomputer.rc
+endif
+
libdivecomputer_la_DEPENDENCIES = libdivecomputer.exp
libdivecomputer.exp: libdivecomputer.symbols
$(AM_V_GEN) sed -e '/^$$/d' $< > $@
+.rc.lo:
+ $(AM_V_GEN) $(LIBTOOL) --silent --tag=RC --mode=compile $(RC) $< -o $@
+
CLEANFILES = libdivecomputer.exp
EXTRA_DIST = libdivecomputer.symbols
diff --git a/src/libdivecomputer.rc.in b/src/libdivecomputer.rc.in
new file mode 100644
index 0000000..81287f7
--- /dev/null
+++ b/src/libdivecomputer.rc.in
@@ -0,0 +1,30 @@
+#include
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION @DC_VERSION_MAJOR@,@DC_VERSION_MINOR@,@DC_VERSION_MICRO@,0
+PRODUCTVERSION @DC_VERSION_MAJOR@,@DC_VERSION_MINOR@,@DC_VERSION_MICRO@,0
+FILEFLAGSMASK 0
+FILEFLAGS 0
+FILEOS VOS__WINDOWS32
+FILETYPE VFT_DLL
+FILESUBTYPE 0
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "The libdivecomputer developers"
+ VALUE "FileDescription", "A library for communication with various dive computers."
+ VALUE "FileVersion", "@VERSION@"
+ VALUE "InternalName", "libdivecomputer"
+ VALUE "LegalCopyright", "Copyright © 2010 Jef Driesen"
+ VALUE "OriginalFilename", "libdivecomputer.dll"
+ VALUE "ProductName", "libdivecomputer"
+ VALUE "ProductVersion", "@VERSION@"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 1033, 1200
+ END
+END