X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=meson.build;h=7146fb82ee03e95ea52d234d67831d13e762352b;hb=9bd080c7d56938f83f7c9d472e577c138c3aefbb;hp=83570057d161a75573e691062b4c372cba7e2b5e;hpb=9b7d691b4cc5db7dbfc18c82e86c1207fcac4722;p=nageru diff --git a/meson.build b/meson.build index 8357005..7146fb8 100644 --- a/meson.build +++ b/meson.build @@ -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 +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')