diff options
Diffstat (limited to 'examples/meson.build')
-rw-r--r-- | examples/meson.build | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/examples/meson.build b/examples/meson.build index aa04e80..65daa31 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -1,4 +1,4 @@ -# Copyright 2021-2023 David Robillard <d@drobilla.net> +# Copyright 2021-2025 David Robillard <d@drobilla.net> # SPDX-License-Identifier: 0BSD OR ISC data_dir = get_option('prefix') / get_option('datadir') / 'pugl-0' @@ -27,12 +27,6 @@ vulkan_examples = [ 'pugl_vulkan_demo.c', ] -includes = include_directories( - '..', - '../bindings/cpp/include', - '../include', -) - # Suppress some additional C warnings in examples example_c_args = [] if get_option('warning_level') == 'everything' @@ -61,6 +55,13 @@ if get_option('warning_level') == 'everything' and is_variable('cpp') '-Wno-old-style-cast', '-Wno-switch-enum', ] + if host_machine.system() == 'windows' + example_cpp_args += [ + '-Wno-deprecated-declarations', + '-Wno-format-nonliteral', + '-Wno-nonportable-system-include-path', + ] + endif elif cpp.get_id() == 'gcc' example_cpp_args += [ '-Wno-effc++', @@ -113,7 +114,7 @@ else foreach example : stub_examples source = [example] target = example.split('.')[0] - dependencies = [pugl_dep, pugl_stub_dep] + dependencies = [pugl_dep, pugl_stub_dep, puglutil_dep] defines = [] executable( @@ -122,7 +123,7 @@ else c_args: example_defines + example_c_args + defines, cpp_args: example_defines + example_cpp_args + defines, dependencies: dependencies, - include_directories: includes, + implicit_include_directories: false, ) endforeach @@ -131,7 +132,7 @@ else foreach example : gl_examples source = [example] target = example.split('.')[0] - dependencies = [pugl_dep, pugl_gl_dep] + dependencies = [pugl_dep, pugl_gl_dep, puglutil_dep] defines = [] if target == 'pugl_shader_demo' @@ -141,6 +142,10 @@ else elif target == 'pugl_print_events' dependencies += [pugl_stub_dep] elif target == 'pugl_cpp_demo' + if not is_variable('puglpp_dep') + continue + endif + dependencies += [puglpp_dep] endif @@ -150,7 +155,7 @@ else c_args: example_defines + example_c_args + defines, cpp_args: example_defines + example_cpp_args + defines, dependencies: dependencies, - include_directories: includes, + implicit_include_directories: false, ) endforeach endif @@ -163,8 +168,8 @@ else target, example, c_args: example_defines + example_c_args + cairo_args, - dependencies: [pugl_dep, pugl_cairo_dep], - include_directories: includes, + dependencies: [pugl_dep, pugl_cairo_dep, puglutil_dep], + implicit_include_directories: false, ) endforeach endif @@ -174,12 +179,17 @@ else foreach example : vulkan_examples source = [example] target = example.split('.')[0] - dependencies = [dl_dep, pugl_vulkan_dep] + dependencies = [dl_dep, pugl_vulkan_dep, puglutil_dep] defines = [] if target == 'pugl_vulkan_cpp_demo' + if not is_variable('puglpp_dep') + continue + endif + source += ['file_utils.c'] defines += ['-D_POSIX_C_SOURCE=200809L'] + dependencies += [puglpp_dep] endif executable( @@ -188,7 +198,7 @@ else c_args: example_defines + example_c_args + defines, cpp_args: example_defines + example_cpp_args + defines, dependencies: dependencies, - include_directories: includes, + implicit_include_directories: false, ) endforeach endif |