diff --git a/build-aux/meson.build b/build-aux/meson.build new file mode 100644 index 0000000..9b8b788 --- /dev/null +++ b/build-aux/meson.build @@ -0,0 +1,14 @@ + +scripts = [ + 'buildenv.py', + 'dist.py', + 'gen-authors.py', + 'msitool.py', + 'post_install.py', + 'run-windres.py', +] + +foreach name : scripts + sname = name.split('.')[0].underscorify() + set_variable('@0@_prog'.format(sname), find_program(name)) +endforeach diff --git a/data/meson.build b/data/meson.build index 4325108..c978393 100644 --- a/data/meson.build +++ b/data/meson.build @@ -50,7 +50,7 @@ if with_msi output: ['buildenv.txt'], command: [ python3, - join_paths(meson.source_root(), 'build-aux', 'buildenv.py') + buildenv_prog, ], capture: true) @@ -93,7 +93,7 @@ if with_msi build_by_default: false, command: [ python3, - join_paths(meson.source_root(), 'build-aux', 'msitool.py'), + msitool_prog, meson.build_root(), prefix, wixl_arch, diff --git a/meson.build b/meson.build index 51c9513..e169875 100644 --- a/meson.build +++ b/meson.build @@ -508,9 +508,10 @@ configure_file( configuration: conf_data ) +subdir('build-aux') + if git - authors_helper = join_paths(meson.source_root(), 'build-aux', 'gen-authors.py') - authors = run_command(python3.path(), authors_helper, env: runutf8) + authors = run_command(python3.path(), gen_authors_prog, env: runutf8) authors_file = 'AUTHORS.in' authors_conf = configuration_data() @@ -534,9 +535,8 @@ if git configuration: conf_data ) - dist_helper = join_paths(meson.source_root(), 'build-aux', 'dist.py') - meson.add_dist_script(python3.path(), dist_helper, meson.build_root(), 'AUTHORS') - meson.add_dist_script(python3.path(), dist_helper, meson.build_root(), 'virt-viewer.spec') + meson.add_dist_script(python3.path(), dist_prog, meson.build_root(), 'AUTHORS') + meson.add_dist_script(python3.path(), dist_prog, meson.build_root(), 'virt-viewer.spec') endif gnome = import('gnome') diff --git a/src/meson.build b/src/meson.build index 8bf1372..bd5d544 100644 --- a/src/meson.build +++ b/src/meson.build @@ -174,7 +174,6 @@ executable( if host_machine.system() == 'windows' windres = find_program('windres') - runwindres = join_paths(meson.source_root(), 'build-aux', 'run-windres.py') rcfile = configure_file( input: 'virt-viewer.rc.in', @@ -188,7 +187,7 @@ if host_machine.system() == 'windows' output: ['virt-viewer-rc.o'], command : [ python3, - runwindres, + run_windres_prog, windres, join_paths(meson.build_root(), 'icons'), meson.current_source_dir(),