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)
16 git_commit = run_command(
17 [git, 'rev-parse', '--short=12', 'HEAD'],
20 git_date = run_command(
21 [git, 'show', '--quiet', '--date=format-local:%F %T', '--format=%cd'],
26 if git_commit.returncode() == 0
27 edid_decode_args += ['-DSHA=' + git_commit.stdout().strip()]
29 if git_date.returncode() == 0
30 edid_decode_args += ['-DDATE=' + git_date.stdout().strip()]
34 if target_machine.system() == 'emscripten'
35 edid_decode_link_args += [
36 '-sEXPORTED_FUNCTIONS=_parse_edid',
37 '-sEXPORTED_RUNTIME_METHODS=ccall,cwrap'
41 foreach filename : ['edid-decode.html', 'edid-decode.ico']
43 'emscripten' / filename,
50 edid_decode_sources = [
55 'parse-base-block.cpp',
56 'parse-cta-block.cpp',
57 'parse-di-ext-block.cpp',
58 'parse-displayid-block.cpp',
59 'parse-ls-ext-block.cpp',
60 'parse-vtb-ext-block.cpp',
64 edid_decode = executable(
66 sources: edid_decode_sources,
67 cpp_args: edid_decode_args,
68 link_args: edid_decode_link_args,
72 meson.override_find_program(
77 install_man('edid-decode.1')