Commit bb8725fb authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

win32: Generate a resource file & link it with the library

Fix #37
parent c2ade34f
......@@ -288,6 +288,23 @@ foreach bitdepth : dav1d_bitdepths
bitdepth_objs += bitdepth_lib.extract_all_objects()
endforeach
if host_machine.system() == 'windows'
winmod = import('windows')
rc_data = configuration_data()
rc_data.set('VERSION_MAJOR', dav1d_version_major)
rc_data.set('VERSION_MINOR', dav1d_version_minor)
rc_data.set('VERSION_REVISION', dav1d_version_revision)
rc_data.set('VERSION_EXTRA', '0')
rc_data.set('COPYRIGHT_YEARS', '2018')
rc_file = configure_file(input: 'src/dav1d.rc.in',
output: 'dav1d.rc', configuration: rc_data)
rc_source = winmod.compile_resources(rc_file,
include_directories: include_directories('src'))
libdav1d_sources += rc_source
#entrypoints_objs += rc_source
endif
libdav1d = library('dav1d',
libdav1d_sources, nasm_objs,
version: meson.project_version(),
......
#define VERSION_NUMBER @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_REVISION@,@VERSION_EXTRA@
#define VERSION_NUMBER_STR "@VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_REVISION@,@VERSION_EXTRA@"
#include <winuser.h>
1 VERSIONINFO
FILETYPE 2
FILEOS 4
PRODUCTVERSION VERSION_NUMBER
FILEVERSION VERSION_NUMBER
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "VideoLAN"
VALUE "ProductName", "dav1d"
VALUE "ProductVersion", VERSION_NUMBER_STR
VALUE "FileVersion", VERSION_NUMBER_STR
VALUE "FileDescription", "dav1d AV1 decoder"
VALUE "LegalCopyright", "Copyright \251 @COPYRIGHT_YEARS@ VideoLAN and dav1d Authors"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment