]> git.sesse.net Git - nageru/blob - meson.build
Unbreak compilation with CEF.
[nageru] / meson.build
1 project('nageru', 'cpp', default_options: ['buildtype=debugoptimized'])
2
3 cxx = meson.get_compiler('cpp')
4
5 # Use lld if we can; it links a lot faster than ld.bfd or gold.
6 code = '''#include <stdio.h>
7 int main() { printf("Hello, world!\n"); return 0; }
8 '''
9 if cxx.links(code, args: '-fuse-ld=lld', name: 'check for LLD')
10         add_project_link_arguments('-fuse-ld=lld')
11 endif
12
13 # Add the right MOVIT_SHADER_DIR definition.
14 r = run_command('pkg-config', '--variable=shaderdir', 'movit')
15 if r.returncode() != 0
16         error('Movit pkg-config installation is broken.')
17 endif
18 add_project_arguments('-DMOVIT_SHADER_DIR="' + r.stdout().strip() + '"', language: 'cpp')
19
20 # DeckLink has these issues, and we include it from various places.
21 if cxx.has_argument('-Wno-non-virtual-dtor')
22         add_project_arguments('-Wno-non-virtual-dtor', language: 'cpp')
23 endif
24
25 # FFmpeg has a lot of deprecated APIs whose replacements are not available
26 # in Debian stable, so we suppress these warnings.
27 if cxx.has_argument('-Wno-deprecated-declarations')
28         add_project_arguments('-Wno-deprecated-declarations', language: 'cpp')
29 endif
30
31 # This needs to be done before declaring any build targets.
32 if get_option('cef_dir') != ''
33         add_project_arguments('-DHAVE_CEF=1', language: 'cpp')
34 endif
35
36 top_include = include_directories('.')
37
38 subdir('shared')
39 subdir('nageru')
40 subdir('futatabi')