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.
This commit is contained in:
Dylan Baker 2023-02-16 12:03:06 -08:00 committed by Nirbheek Chauhan
parent 8fdb8b01ad
commit 019fda91d0
1 changed files with 1 additions and 1 deletions

View File

@ -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)