Fix #1004, 1005: Various meson problems
[geeqie.git] / doc / 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 subdir('html')
15
16 guideindex_xml = files('docbook/GuideIndex.xml')
17 destdir = join_paths(meson.current_build_dir(), 'html/')
18 iconsdir = join_paths(meson.current_source_dir(), 'icons/')
19 guideindex_html = join_paths(destdir, 'GuideIndex.html')
20 guideindex_ln = join_paths(destdir, 'index.html')
21
22 run_command(gnome_doc_tool, 'html', '-o', destdir, '-p', iconsdir, guideindex_xml, check : false)
23 run_command(find_program('ln'), '-s', '-f', guideindex_html, guideindex_ln, check : false)
24
25 install_subdir(destdir, install_dir : helpdir, exclude_directories : 'lua-api/latex')
26
27 doxygen = find_program('doxygen', required : false)
28 if doxygen.found()
29     srcdir = join_paths(meson.source_root())
30     destdir = join_paths(meson.build_root(), 'doc', 'html', 'lua-api')
31
32     run_command(find_program('create-doxygen-lua-api.sh'), srcdir, destdir, check : false)
33
34     user_documentation_message += 'lua-api help file will be created\n'
35 else
36     user_documentation_message += 'doxygen ' + notfound + ' - lua-api help file will not be created\n'
37 endif