Don't crash when using d_module_versions for pkg-config

pull/3347/head
Matthias Klumpp 7 years ago committed by Jussi Pakkanen
parent b4aee4675a
commit 6146353f45
  1. 2
      mesonbuild/modules/pkgconfig.py
  2. 9
      test cases/d/3 shared library/meson.build

@ -349,7 +349,7 @@ class PkgConfigModule(ExtensionModule):
if dversions:
compiler = state.environment.coredata.compilers.get('d')
if compiler:
deps.add_cflags(compiler.get_feature_args({'versions': dversions}))
deps.add_cflags(compiler.get_feature_args({'versions': dversions}, None))
def parse_variable_list(stringlist):
reserved = ['prefix', 'libdir', 'includedir']

@ -10,3 +10,12 @@ endif
ldyn = shared_library('stuff', 'libstuff.d', install : true)
ed = executable('app_d', 'app.d', link_with : ldyn, install : true)
test('linktest_dyn', ed)
# test D attributes for pkg-config
pkgc = import('pkgconfig')
pkgc.generate(name: 'test',
libraries: ldyn,
subdirs: 'd/stuff',
description: 'A test of D attributes to pkgconfig.generate.',
d_module_versions: ['Use_Static']
)

Loading…
Cancel
Save