vala: don't build .h, .vala, and .gir if export_dynamic is False

The current check results in *any* value to `export_dynamic` generating
vala import targets, even `false`. This is pretty clearly wrong, as it
really wants to treat an unset export_dynamic as false.
pull/11406/head
Dylan Baker 2 years ago committed by Nirbheek Chauhan
parent 8fdb8b01ad
commit 019fda91d0
  1. 2
      mesonbuild/build.py

@ -1075,7 +1075,7 @@ class BuildTarget(Target):
self.add_pch('c', extract_as_list(kwargs, 'c_pch'))
self.add_pch('cpp', extract_as_list(kwargs, 'cpp_pch'))
if not isinstance(self, Executable) or 'export_dynamic' in kwargs:
if not isinstance(self, Executable) or kwargs.get('export_dynamic', False):
self.vala_header = kwargs.get('vala_header', self.name + '.h')
self.vala_vapi = kwargs.get('vala_vapi', self.name + '.vapi')
self.vala_gir = kwargs.get('vala_gir', None)

Loading…
Cancel
Save