[geary/mjog/port-to-libhandy-1: 4/10] build: Allow valadoc to find libhandy vapi when build from a subproject
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/port-to-libhandy-1: 4/10] build: Allow valadoc to find libhandy vapi when build from a subproject
- Date: Tue, 18 Aug 2020 12:19:17 +0000 (UTC)
commit 9c02e8c09c7656a3a541b302a9997c5940c330e5
Author: Michael Gratton <mike vee net>
Date: Sun Aug 16 17:27:19 2020 +1000
build: Allow valadoc to find libhandy vapi when build from a subproject
meson.build | 4 +++-
src/meson.build | 9 ++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index d9eceaa06..100626889 100644
--- a/meson.build
+++ b/meson.build
@@ -118,6 +118,7 @@ if libunwind_dep.found()
endif
# Handy 1.0 is still rather new
+libhandy_vapi = ''
if not libhandy.found()
libhandy_project = subproject(
'libhandy',
@@ -130,9 +131,10 @@ if not libhandy.found()
libhandy = declare_dependency(
dependencies: [
libhandy_project.get_variable('libhandy_dep'),
- libhandy_project.get_variable('libhandy_vapi'),
+ libhandy_project.get_variable('libhandy_vapi')
]
)
+ libhandy_vapi = meson.build_root() / 'subprojects' / 'libhandy' / 'src'
endif
# Optional dependencies
diff --git a/src/meson.build b/src/meson.build
index 314650d2d..982e41c4a 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -138,7 +138,11 @@ valadoc_dependencies = [
valadoc_dep_args = []
foreach dep : valadoc_dependencies
valadoc_dep_args += '--pkg'
- valadoc_dep_args += dep.name()
+ if dep != libhandy
+ valadoc_dep_args += dep.name()
+ else
+ valadoc_dep_args += 'libhandy-1'
+ endif
endforeach
valadoc_dep_args += [ '--pkg', 'posix' ]
@@ -146,6 +150,9 @@ valadoc_vapi_dirs = [
vapi_dir,
meson.current_build_dir()
]
+if libhandy_vapi != ''
+ valadoc_vapi_dirs += libhandy_vapi
+endif
valadoc_vapidir_args = []
foreach dir : valadoc_vapi_dirs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]