edid-decode.1: document the --infoframe option
[edid-decode.git] / meson.build
blobe18a7f29cc022dfdd99928217e0a09a5b618d830
1 project(
2         'edid-decode',
3         'cpp',
6 edid_decode_args = [
7         '-Wno-missing-field-initializers',
8         '-Wno-unused-parameter',
9         '-Wimplicit-fallthrough',
10         '-Wno-variadic-macros',
12 edid_decode_link_args = []
14 git = find_program('git', native: true, required: false)
15 if git.found()
16         git_commit = run_command(
17                 [git, 'rev-parse', '--short=12', 'HEAD'],
18                 check: false,
19         )
20         git_date = run_command(
21                 [git, 'show', '--quiet', '--date=format-local:%F %T', '--format=%cd'],
22                 env: {'TZ': 'UTC'},
23                 check: false,
24         )
26         if git_commit.returncode() == 0
27                 edid_decode_args += ['-DSHA=' + git_commit.stdout().strip()]
28         endif
29         if git_date.returncode() == 0
30                 edid_decode_args += ['-DDATE=' + git_date.stdout().strip()]
31         endif
32 endif
34 if target_machine.system() == 'emscripten'
35         edid_decode_link_args += [
36                 '-sEXPORTED_FUNCTIONS=_parse_edid',
37                 '-sEXPORTED_RUNTIME_METHODS=ccall,cwrap'
38         ]
40         fs = import('fs')
41         foreach filename : ['edid-decode.html', 'edid-decode.ico']
42                 fs.copyfile(
43                         'emscripten' / filename,
44                         install: true,
45                         install_dir: 'bin',
46                 )
47         endforeach
48 endif
50 edid_decode_sources = [
51         'calc-gtf-cvt.cpp',
52         'calc-ovt.cpp',
53         'edid-decode.cpp',
54         'parse-base-block.cpp',
55         'parse-cta-block.cpp',
56         'parse-di-ext-block.cpp',
57         'parse-displayid-block.cpp',
58         'parse-ls-ext-block.cpp',
59         'parse-vtb-ext-block.cpp',
60         'parse-if.cpp',
63 edid_decode = executable(
64         'edid-decode',
65         sources: edid_decode_sources,
66         cpp_args: edid_decode_args,
67         link_args: edid_decode_link_args,
68         install: true,
71 meson.override_find_program(
72         'edid-decode',
73         edid_decode,
76 install_man('edid-decode.1')