xcode-backend: fix include paths

Add project directory as include path
Add include paths from dependencies for all languages (c, c++, objc, objc++)
pull/8303/head
Jeff Moguillansky 4 years ago committed by Jussi Pakkanen
parent 46e3480f7c
commit 5d94d161ff
  1. 3
      mesonbuild/backend/xcodebackend.py

@ -735,6 +735,7 @@ class XCodeBackend(backends.Backend):
product_name = target.get_basename() product_name = target.get_basename()
ldargs += target.link_args ldargs += target.link_args
cargs = [] cargs = []
cargs.append('-I.')
for dep in target.get_external_deps(): for dep in target.get_external_deps():
cargs += dep.get_compile_args() cargs += dep.get_compile_args()
ldargs += dep.get_link_args() ldargs += dep.get_link_args()
@ -753,7 +754,7 @@ class XCodeBackend(backends.Backend):
args = pargs + gargs + targs args = pargs + gargs + targs
if args: if args:
langargs[langnamemap[lang]] = args langargs[langnamemap[lang]] = args
langargs['C'] += cargs langargs[langnamemap[lang]] += cargs
symroot = os.path.join(self.environment.get_build_dir(), target.subdir) symroot = os.path.join(self.environment.get_build_dir(), target.subdir)
self.write_line('%s /* %s */ = {' % (valid, buildtype)) self.write_line('%s /* %s */ = {' % (valid, buildtype))
self.indent_level += 1 self.indent_level += 1

Loading…
Cancel
Save