aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-05-24 14:12:17 -0400
committerDavid Robillard <d@drobilla.net>2021-05-24 15:14:41 -0400
commitf535b6eaeed44093bed7d90b4be76363c2e2e4f4 (patch)
tree035478b033d349e06e8339d0217cf93aa607b268 /meson.build
parent830862ed8345a9620d2ff75293666e46972e2692 (diff)
downloadpugl-f535b6eaeed44093bed7d90b4be76363c2e2e4f4.tar.gz
pugl-f535b6eaeed44093bed7d90b4be76363c2e2e4f4.tar.bz2
pugl-f535b6eaeed44093bed7d90b4be76363c2e2e4f4.zip
Separate stub backends from other backends
Stub backends were a dependency of other backends to allow some code reuse. However, that can cause conflicting symbols if multiple backends are linked into the same binary, which should be possible. To avoid this, move the shared code into the platform implementation, and export those symbols so that backends can use them. This adds some semi-public platform-specific API that can only be used by backends included with pugl. They are undocumented, subject to change at any time without a corresponding version change, and may not be used by third parties (for example by custom backends in an application).
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build10
1 files changed, 4 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index d966b26..d91ef6b 100644
--- a/meson.build
+++ b/meson.build
@@ -356,22 +356,21 @@ endif
# Build Cairo backend
if cairo_dep.found()
name = 'pugl_' + platform + '_cairo' + version_suffix
- sources = ['src/' + platform + '_cairo' + extension,
- 'src/' + platform + '_stub' + extension]
+ sources = ['src/' + platform + '_cairo' + extension]
cairo_backend = build_target(
name, sources,
version: meson.project_version(),
include_directories: include_directories(['include']),
c_args: library_args,
- dependencies: [pugl_dep, cairo_dep, stub_backend_dep],
+ dependencies: [pugl_dep, cairo_dep],
gnu_symbol_visibility: 'hidden',
install: true,
target_type: library_type)
cairo_backend_dep = declare_dependency(
link_with: cairo_backend,
- dependencies: [pugl_dep, cairo_dep, stub_backend_dep])
+ dependencies: [pugl_dep, cairo_dep])
pkg.generate(cairo_backend,
name: 'Pugl Cairo',
@@ -384,8 +383,7 @@ endif
# Build Vulkan backend
if vulkan_dep.found()
name = 'pugl_' + platform + '_vulkan' + version_suffix
- sources = ['src/' + platform + '_vulkan' + extension,
- 'src/' + platform + '_stub' + extension]
+ sources = ['src/' + platform + '_vulkan' + extension]
vulkan_deps = [pugl_dep, vulkan_dep, dl_dep]
vulkan_c_args = library_args