modules: Fix paths to (sub)project source/build directories

The subproject directory name (i.e. 'subprojects') was being added
to the path even for the main project.
pull/10622/merge
David Ward 3 years ago committed by Eli Schwartz
parent 68add86f7b
commit ee5a729190
  1. 4
      mesonbuild/modules/gnome.py
  2. 5
      mesonbuild/modules/hotdoc.py

@ -1185,8 +1185,8 @@ class GnomeModule(ExtensionModule):
scan_command += list(scan_external_ldflags)
if self._gir_has_option('--sources-top-dirs'):
scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_source_dir(), self.interpreter.subproject_dir, state.subproject)]
scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_build_dir(), self.interpreter.subproject_dir, state.subproject)]
scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_source_dir(), state.root_subdir)]
scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_build_dir(), state.root_subdir)]
if '--warn-error' in scan_command:
FeatureDeprecated.single_use('gnome.generate_gir argument --warn-error', '0.55.0',

@ -177,9 +177,8 @@ class HotdocTargetBuilder:
value, _ = self.get_value([list, str], 'gi_c_source_roots', default=[], force_list=True)
value.extend([
os.path.join(self.state.environment.get_source_dir(),
self.interpreter.subproject_dir, self.state.subproject),
os.path.join(self.state.environment.get_build_dir(), self.interpreter.subproject_dir, self.state.subproject)
os.path.join(self.sourcedir, self.state.root_subdir),
os.path.join(self.builddir, self.state.root_subdir)
])
self.cmd += ['--gi-c-source-roots'] + value

Loading…
Cancel
Save