[+] add project_name for third_party_roots

This commit is contained in:
Siarhei Siniak 2025-05-28 16:35:33 +03:00
parent e0843e8496
commit a7d68110c8
3 changed files with 12 additions and 7 deletions

@ -5,7 +5,7 @@ project(
).stdout().strip('\n'), ).stdout().strip('\n'),
# 'online.fxreader.uv', # 'online.fxreader.uv',
# ['c', 'cpp'], # ['c', 'cpp'],
version: '0.1.5.17+27.7', version: '0.1.5.17+27.8',
# default_options: [ # default_options: [
# 'cpp_std=c++23', # 'cpp_std=c++23',
# # 'prefer_static=true', # # 'prefer_static=true',

@ -368,8 +368,8 @@ class CLI(abc.ABC):
) )
shutil.rmtree(pyproject_build_dir) shutil.rmtree(pyproject_build_dir)
if len(self.third_party_roots) > 0: if len(self.third_party_roots(project_name)) > 0:
extra_args.extend(['-Csetup-args=%s' % ('-Dthird_party_roots=%s' % str(o.absolute())) for o in self.third_party_roots]) extra_args.extend(['-Csetup-args=%s' % ('-Dthird_party_roots=%s' % str(o.absolute())) for o in self.third_party_roots(project_name)])
cmd = [ cmd = [
sys.executable, sys.executable,
@ -551,8 +551,10 @@ class CLI(abc.ABC):
] ]
) )
@property def third_party_roots(
def third_party_roots(self) -> list[pathlib.Path]: self,
project_name: Optional[str] = None,
) -> list[pathlib.Path]:
return [] return []
class meson_toolchains_t: class meson_toolchains_t:
@ -642,8 +644,8 @@ class CLI(abc.ABC):
extra_args: list[str] = [] extra_args: list[str] = []
if len(self.third_party_roots) > 0: if len(self.third_party_roots(project_name)) > 0:
extra_args.extend(['-Dthird_party_roots=%s' % str(o.absolute()) for o in self.third_party_roots]) extra_args.extend(['-Dthird_party_roots=%s' % str(o.absolute()) for o in self.third_party_roots(project_name)])
extra_args = self._cross_file( extra_args = self._cross_file(
extra_args=extra_args, extra_args=extra_args,

Binary file not shown.