aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-10-07 15:00:52 -0400
committerDavid Robillard <d@drobilla.net>2022-10-07 15:00:52 -0400
commit71fa73303e8df651edaf606c07ded6fec2b066af (patch)
tree72cd81a5d2e5be1d856300c40de7c368f26bc4bc
parentb0af14c346817c6660ab135c7b542205e8e59b7d (diff)
downloadpugl-71fa73303e8df651edaf606c07ded6fec2b066af.tar.gz
pugl-71fa73303e8df651edaf606c07ded6fec2b066af.tar.bz2
pugl-71fa73303e8df651edaf606c07ded6fec2b066af.zip
Override pkg-config dependencies within meson
-rw-r--r--bindings/cpp/meson.build8
-rw-r--r--meson.build28
2 files changed, 29 insertions, 7 deletions
diff --git a/bindings/cpp/meson.build b/bindings/cpp/meson.build
index 313f1df..0383eed 100644
--- a/bindings/cpp/meson.build
+++ b/bindings/cpp/meson.build
@@ -9,10 +9,14 @@ puglpp_dep = declare_dependency(
link_with: libpugl,
)
+puglpp_versioned_name = 'puglpp-@0@'.format(major_version)
+
pkg.generate(
description: 'Pugl GUI library C++ bindings',
- filebase: 'puglpp-@0@'.format(major_version),
+ filebase: puglpp_versioned_name,
name: 'Pugl++',
- subdirs: ['puglpp-@0@'.format(major_version)],
+ subdirs: [puglpp_versioned_name],
version: meson.project_version(),
)
+
+meson.override_dependency(puglpp_versioned_name, puglpp_dep)
diff --git a/meson.build b/meson.build
index 309348e..48075d8 100644
--- a/meson.build
+++ b/meson.build
@@ -4,7 +4,7 @@
project('pugl', ['c'],
version: '0.4.0',
license: 'ISC',
- meson_version: '>= 0.49.2',
+ meson_version: '>= 0.54.0',
default_options: [
'b_ndebug=if-release',
'buildtype=release',
@@ -186,6 +186,8 @@ pkg.generate(
version: meson.project_version(),
)
+meson.override_dependency(versioned_name, pugl_dep)
+
############
# Backends #
############
@@ -212,14 +214,18 @@ if get_option('stub')
dependencies: [pugl_dep],
)
+ stub_pkg_name = 'pugl-stub-@0@'.format(major_version)
+
pkg.generate(
stub_backend,
description: 'Native window pugl graphics backend',
- filebase: 'pugl-stub-@0@'.format(major_version),
+ filebase: stub_pkg_name,
name: 'Pugl Stub',
subdirs: [versioned_name],
version: meson.project_version(),
)
+
+ meson.override_dependency(stub_pkg_name, stub_backend_dep)
endif
# OpenGL
@@ -245,14 +251,18 @@ if opengl_dep.found()
dependencies: [pugl_dep, opengl_dep],
)
+ gl_pkg_name = 'pugl-gl-@0@'.format(major_version)
+
pkg.generate(
gl_backend,
description: 'Pugl GUI library with OpenGL backend',
- filebase: 'pugl-gl-@0@'.format(major_version),
+ filebase: gl_pkg_name,
name: 'Pugl OpenGL',
subdirs: [versioned_name],
version: meson.project_version(),
)
+
+ meson.override_dependency(gl_pkg_name, gl_backend_dep)
endif
# Cairo
@@ -290,14 +300,18 @@ if cairo_dep.found()
link_with: cairo_backend,
)
+ cairo_pkg_name = 'pugl-cairo-@0@'.format(major_version)
+
pkg.generate(
cairo_backend,
description: 'Pugl GUI library with Cairo backend',
- filebase: 'pugl-cairo-@0@'.format(major_version),
+ filebase: cairo_pkg_name,
name: 'Pugl Cairo',
subdirs: [versioned_name],
version: meson.project_version(),
)
+
+ meson.override_dependency(cairo_pkg_name, cairo_backend_dep)
endif
# Vulkan
@@ -335,14 +349,18 @@ if vulkan_dep.found()
link_with: vulkan_backend,
)
+ vulkan_pkg_name = 'pugl-vulkan-@0@'.format(major_version)
+
pkg.generate(
vulkan_backend,
description: 'Pugl GUI library with Vulkan backend',
- filebase: 'pugl-vulkan-@0@'.format(major_version),
+ filebase: vulkan_pkg_name,
name: 'Pugl Vulkan',
subdirs: [versioned_name],
version: meson.project_version(),
)
+
+ meson.override_dependency(vulkan_pkg_name, vulkan_backend_dep)
endif
###############################