Skip to content

Commit

Permalink
Add version resource
Browse files Browse the repository at this point in the history
  • Loading branch information
FakeMichau committed Sep 19, 2024
1 parent 76eddc2 commit 5a21b69
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
windows = import('windows')

rc_file = configure_file(
input: 'resource.rc.in',
output: 'resource.rc',
configuration: {
'FILEVERSION': '1,0,0,0',
}
)

rc = windows.compile_resources(rc_file)

dll = shared_library(
'nvapi'+target_suffix,
['main.cpp', 'fakenvapi.cpp', 'util.cpp', 'log.cpp'],
rc,
name_prefix : '',
dependencies : [ lib_dxgi ],
include_directories: [ spdlog_headers ],
Expand Down
19 changes: 19 additions & 0 deletions src/resource.rc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <windows.h>

VS_VERSION_INFO VERSIONINFO
FILEVERSION @FILEVERSION@
FILETYPE VFT_DLL
{
BLOCK "StringFileInfo"
{
BLOCK "040904B0"
{
VALUE "ProductName", "fakenvapi\0"
VALUE "FileVersion", "@FILEVERSION@\0"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0409, 1252
}
}

0 comments on commit 5a21b69

Please sign in to comment.