aboutsummaryrefslogtreecommitdiffstats
path: root/examples/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'examples/meson.build')
-rw-r--r--examples/meson.build33
1 files changed, 18 insertions, 15 deletions
diff --git a/examples/meson.build b/examples/meson.build
index 0c4f998..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'
@@ -120,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(
@@ -129,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
@@ -138,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'
@@ -148,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
@@ -157,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
@@ -170,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
@@ -181,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(
@@ -195,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