]> git.sesse.net Git - nageru/blobdiff - meson.build
Combine the Nageru and Futatabi files that are identical.
[nageru] / meson.build
index 83570057d161a75573e691062b4c372cba7e2b5e..7146fb82ee03e95ea52d234d67831d13e762352b 100644 (file)
@@ -1,5 +1,15 @@
 project('nageru', 'cpp', default_options: ['buildtype=debugoptimized'])
 
+cxx = meson.get_compiler('cpp')
+
+# Use lld if we can; it links a lot faster than ld.bfd or gold.
+code = '''#include <stdio.h>
+int main() { printf("Hello, world!\n"); return 0; }
+'''
+if cxx.links(code, args: '-fuse-ld=lld', name: 'check for LLD')
+       add_project_link_arguments('-fuse-ld=lld')
+endif
+
 # Add the right MOVIT_SHADER_DIR definition.
 r = run_command('pkg-config', '--variable=shaderdir', 'movit')
 if r.returncode() != 0
@@ -7,5 +17,19 @@ if r.returncode() != 0
 endif
 add_project_arguments('-DMOVIT_SHADER_DIR="' + r.stdout().strip() + '"', language: 'cpp')
 
+# DeckLink has these issues, and we include it from various places.
+if cxx.has_argument('-Wno-non-virtual-dtor')
+       add_project_arguments('-Wno-non-virtual-dtor', language: 'cpp')
+endif
+
+# FFmpeg has a lot of deprecated APIs whose replacements are not available
+# in Debian stable, so we suppress these warnings.
+if cxx.has_argument('-Wno-deprecated-declarations')
+       add_project_arguments('-Wno-deprecated-declarations', language: 'cpp')
+endif
+
+top_include = include_directories('.')
+
+subdir('shared')
 subdir('nageru')
 subdir('futatabi')