diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/meson.build b/meson.build index 7a413ff..02e83b8 100644 --- a/meson.build +++ b/meson.build @@ -43,6 +43,7 @@ if get_option('strict') elif cc.get_id() == 'gcc' c_warnings += [ '-Wno-padded', + '-Wno-pragmas', '-Wno-suggest-attribute=const', '-Wno-suggest-attribute=pure', '-Wno-extra-semi', # Qt headers @@ -56,9 +57,6 @@ if get_option('strict') ] endif - add_project_arguments(cc.get_supported_arguments(c_warnings), - language: ['c']) - cpp_warnings = all_cpp_warnings if cpp.get_id() == 'clang' cpp_warnings += [ @@ -75,6 +73,7 @@ if get_option('strict') cpp_warnings += [ '-Wno-cast-qual', '-Wno-padded', + '-Wno-pragmas', '-Wno-suggest-attribute=const', '-Wno-suggest-attribute=pure', '-Wno-useless-cast', @@ -82,10 +81,36 @@ if get_option('strict') ] endif - add_project_arguments(cpp.get_supported_arguments(cpp_warnings), - language: ['cpp']) +else + c_warnings = [] + if cc.get_id() == 'clang' + c_warnings += [ + '-Wno-pragmas', + ] + elif cc.get_id() == 'gcc' + c_warnings += [ + '-Wno-pragmas', + ] + endif + + cpp_warnings = [] + if cpp.get_id() == 'clang' + cpp_warnings += [ + '-Wno-pragmas', + ] + elif cpp.get_id() == 'gcc' + cpp_warnings += [ + '-Wno-pragmas', + ] + endif endif +add_project_arguments(cc.get_supported_arguments(c_warnings), + language: ['c']) + +add_project_arguments(cpp.get_supported_arguments(cpp_warnings), + language: ['cpp']) + # Add special arguments for MSVC if cc.get_id() == 'msvc' msvc_args = [ @@ -112,6 +137,8 @@ dl_dep = cc.find_library('dl', required: false) # Dependencies +gtk2_quartz_dep = disabler() + lv2_dep = dependency('lv2', version: '>= 1.18.3', fallback: ['lv2', 'lv2_dep']) @@ -119,7 +146,9 @@ lv2_dep = dependency('lv2', x11_dep = dependency('x11', required: false) gtk2_dep = dependency('gtk+-2.0', version: '>=2.18.0', required: false)#, include_type: 'system') gtk2_x11_dep = dependency('gtk+-x11-2.0', required: false)#, include_type: 'system') -gtk2_quartz_dep = dependency('gtk+-quartz-2.0', required: false)#, include_type: 'system') +if host_machine.system() == 'darwin' + gtk2_quartz_dep = dependency('gtk+-quartz-2.0', required: false)#, include_type: 'system') +endif gtk3_dep = dependency('gtk+-3.0', version: '>=3.14.0', required: false)#, include_type: 'system') gtk3_x11_dep = dependency('gtk+-x11-3.0', version: '>=3.14.0', required: false)#, include_type: 'system') qt5_dep = dependency('Qt5Widgets', version: '>=5.1.0', required: false)#, include_type: 'system') @@ -252,7 +281,7 @@ if qt5_dep.found() and qt5_x11_dep.found() endif -if meson.version().version_compare('>=0.53.0') +if not meson.is_subproject() and meson.version().version_compare('>=0.53.0') # summary('Tests', get_option('tests'), bool_yn: true) summary('Install prefix', get_option('prefix')) |