Auto-generate list of authors and translators
[geeqie.git] / src / credits / meson.build
1 # This file is a part of Geeqie project (https://www.geeqie.org/).
2 # Copyright (C) 2008 - 2022 The Geeqie Team
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 #
13
14 if running_from_git
15     run_command(find_program('authors.sh'),  meson.current_build_dir(), 'running_from_git', check : false)
16 else
17     run_command(find_program('authors.sh'),  meson.current_build_dir(), '', check : false)
18 endif
19
20 run_command(find_program('translators.sh'),  meson.source_root(), meson.current_build_dir(), check : false)
21
22 message(meson.current_build_dir())
23 source_string = '--sourcedir=' + meson.current_build_dir()
24
25 target_string = '--target=' + meson.current_build_dir() + '/credits.h'
26 credits_resources_h = custom_target('credits_resources_h',
27                 input : 'credits.gresource.xml',
28                 output : 'credits.h',
29                 command : [glib_compile_resources, '--generate-header', source_string,target_string, '@INPUT@'])
30
31 target_string = '--target=' + meson.current_build_dir() + '/credits.c'
32 credits_resources_c = custom_target('credits_resources_c',
33                 input : 'credits.gresource.xml',
34                 output : 'credits.c',
35                 command : [glib_compile_resources, '--generate-source', target_string, source_string, '@INPUT@'])
36
37 project_sources += credits_resources_h
38 project_sources += credits_resources_c