1 project('nageru', 'cpp', default_options: ['buildtype=debugoptimized'], version: '1.8.0-pre')
3 cxx = meson.get_compiler('cpp')
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; }
9 if cxx.links(code, args: '-fuse-ld=lld', name: 'check for LLD')
10 add_project_link_arguments('-fuse-ld=lld', language: 'cpp')
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.')
18 add_project_arguments('-DMOVIT_SHADER_DIR="' + r.stdout().strip() + '"', language: 'cpp')
20 # Make the Nageru version available as a #define.
21 add_project_arguments('-DNAGERU_VERSION="' + meson.project_version() + '"', language: 'cpp')
23 # DeckLink has these issues, and we include it from various places.
24 if cxx.has_argument('-Wno-non-virtual-dtor')
25 add_project_arguments('-Wno-non-virtual-dtor', language: 'cpp')
28 # FFmpeg has a lot of deprecated APIs whose replacements are not available
29 # in Debian stable, so we suppress these warnings.
30 if cxx.has_argument('-Wno-deprecated-declarations')
31 add_project_arguments('-Wno-deprecated-declarations', language: 'cpp')
34 # This needs to be done before declaring any build targets.
35 if get_option('cef_dir') != ''
36 add_project_arguments('-DHAVE_CEF=1', language: 'cpp')
39 top_include = include_directories('.')