Make depends: of windows.compile_resources() include-able

Add the output directories for any custom target in depends: to the resource
compiler include path
pull/3752/head
Jon Turney 7 years ago committed by Nirbheek Chauhan
parent c0f59399e4
commit 7c4b8591b0
  1. 4
      mesonbuild/interpreter.py
  2. 4
      mesonbuild/modules/windows.py

@ -854,6 +854,10 @@ class CustomTargetHolder(TargetHolder):
def __delitem__(self, index):
raise InterpreterException('Cannot delete a member of a CustomTarget')
def outdir_include(self):
return IncludeDirsHolder(build.IncludeDirs('', [], False,
[self.interpreter.backend.get_target_dir(self.held_object)]))
class RunTargetHolder(InterpreterObject, ObjectHolder):
def __init__(self, name, command, args, dependencies, subdir, subproject):
InterpreterObject.__init__(self)

@ -20,6 +20,7 @@ from ..mesonlib import MesonException, extract_as_list
from . import get_include_args
from . import ModuleReturnValue
from . import ExtensionModule
from ..interpreter import CustomTargetHolder
from ..interpreterbase import permittedKwargs, FeatureNewKwargs
class WindowsModule(ExtensionModule):
@ -38,6 +39,9 @@ class WindowsModule(ExtensionModule):
extra_args = mesonlib.stringlistify(kwargs.get('args', []))
wrc_depend_files = extract_as_list(kwargs, 'depend_files', pop = True)
wrc_depends = extract_as_list(kwargs, 'depends', pop = True)
for d in wrc_depends:
if isinstance(d, CustomTargetHolder):
extra_args += get_include_args([d.outdir_include()])
inc_dirs = extract_as_list(kwargs, 'include_directories', pop = True)
for incd in inc_dirs:
if not isinstance(incd.held_object, (str, build.IncludeDirs)):

Loading…
Cancel
Save