]> git.tdb.fi Git - ext/sigc++-2.0.git/blob - sigc++/adaptors/meson.build
Import libsigc++ 2.10.8 sources
[ext/sigc++-2.0.git] / sigc++ / adaptors / meson.build
1 # sigc++/adaptors
2
3 # Input: maintainer_mode, python3, handle_built_files, m4_template, m4_include_dir
4 # Input and output: built_h_files, built_h_file_targets
5
6 # .m4 files to build .h files from.
7 adaptors_h_m4_files = [
8   'adaptor_trait.h',
9   'bind.h',
10   'bind_return.h',
11   'compose.h',
12   'deduce_result_type.h',
13   'exception_catch.h',
14   'hide.h',
15   'retype.h',
16   'retype_return.h',
17   'track_obj.h',
18 ]
19 foreach file : adaptors_h_m4_files
20   built_h_files += 'adaptors' / file
21 endforeach
22
23 if maintainer_mode
24   # Maintainer mode. Generate .h files from .m4 files in macros/ directory.
25   foreach file : adaptors_h_m4_files
26     built_h_file_targets += custom_target('adaptors_' + file,
27       input: 'macros' / file + '.m4',
28       output: file,
29       command: [
30         python3, handle_built_files, 'build_from_m4',
31         m4_include_dir,
32         '@INPUT@',
33         '@OUTPUT@',
34       ],
35       depend_files: m4_template,
36       build_by_default: maintainer_mode,
37       install: false,
38     )
39   endforeach
40 endif