Files
git/meson.build
Patrick Steinhardt 97121bb017 gitk: fix msgfmt being required
While the Meson build instructions already handle the case where msgfmt
wasn't found, we forgot to mark the dependency itself as optional. This
causes an error in case the executable could not be found:

  Project name: gitk
  Project version: undefined
  Program sh found: YES (C:\Program Files\Git\bin\sh.EXE)
  Program wish found: YES (C:\Program Files\Git\mingw64\bin\wish.EXE)
  Program chmod found: YES (C:\Program Files\Git\usr\bin\chmod.EXE)
  Program mv found: YES (C:\Program Files\Git\usr\bin\mv.EXE)
  Program sed found: YES (C:\Program Files\Git\usr\bin\sed.EXE)
  Program msgfmt found: NO

  subprojects\gitk\meson.build:28:3: ERROR: Program 'msgfmt' not found or not executable

Fix the issue by adding the `required: false` parameter.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
2026-02-05 12:54:03 +01:00

31 lines
580 B
Meson

project('gitk')
shell = find_program('sh')
wish = find_program('wish')
# Verify that dependencies of "generate-tcl.sh" are satisfied.
foreach dependency : [ 'chmod', 'mv', 'sed' ]
find_program(dependency)
endforeach
custom_target(
command: [
shell,
meson.current_source_dir() / 'generate-tcl.sh',
wish.full_path(),
'@INPUT@',
'@OUTPUT@',
],
input: 'gitk',
output: 'gitk',
depend_files: [
'generate-tcl.sh',
],
install: true,
install_dir: get_option('bindir'),
)
if find_program('msgfmt', required: false).found()
subdir('po')
endif