'-DGIT_LOCALE_PATH="' + get_option('localedir') + '"',
'-DGIT_MAN_PATH="' + get_option('mandir') + '"',
'-DPAGER_ENV="' + get_option('pager_environment') + '"',
- '-DSHELL_PATH="' + fs.as_posix(shell.full_path()) + '"',
+ '-DSHELL_PATH="' + fs.as_posix(target_shell.full_path()) + '"',
]
+
+ editor_opt = get_option('default_editor')
+ if editor_opt != '' and editor_opt != 'vi'
+ libgit_c_args += '-DDEFAULT_EDITOR="' + editor_opt + '"'
+ endif
+
+ pager_opt = get_option('default_pager')
+ if pager_opt != '' and pager_opt != 'less'
+ libgit_c_args += '-DDEFAULT_PAGER="' + pager_opt + '"'
+ endif
+
+ help_format_opt = get_option('default_help_format')
+ if help_format_opt == 'platform'
+ if host_machine.system() == 'windows'
+ help_format_opt = 'html'
+ else
+ help_format_opt = 'man'
+ endif
+ endif
+ if help_format_opt != 'man'
+ libgit_c_args += '-DDEFAULT_HELP_FORMAT="' + help_format_opt + '"'
+ endif
+
libgit_include_directories = [ '.' ]
libgit_dependencies = [ ]