Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mesonbuild/modules/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ def compile_resources(self, state: 'ModuleState',
build.IncludeDirs('', [], False, [os.path.join('@BUILD_ROOT@', self.interpreter.backend.get_target_dir(d))])
])
include_directories = self.interpreter.extract_incdirs(kwargs)
self_dir = build.IncludeDirs(state.subdir, ['.'], False)
if self_dir not in include_directories:
include_directories.append(self_dir)
extra_args += state.get_include_args(include_directories)

rescomp, rescomp_type = self._find_resource_compiler(state)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
project('foobar', 'c')

if meson.get_compiler('c').get_id() == 'gcc' and host_machine.system() == 'windows'
error('MESON_SKIP_TEST windres has internal error when adding . to include path')
endif

win = import('windows')

subdir('a')
Expand Down
Empty file.
4 changes: 3 additions & 1 deletion test cases/windows/5 resources/res/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
win = import('windows')

res = win.compile_resources('myres.rc',
myres = configure_file(input: 'myres.rc.in', output: 'myres.rc', copy: true)

res = win.compile_resources(myres,
depend_files: 'sample.ico',
include_directories : inc,
args : [['-DFOO'], '-DBAR'])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include<windows.h>
#include"resource.h"
#include "dummy.h"

ICON_ID ICON "sample.ico"
Loading