aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-04-11 12:17:19 -0600
committerQyriad <qyriad@qyriad.me>2024-04-15 19:05:07 -0600
commitb81eec6ed56e5a5ad448359fc3d7755b68e59d0b (patch)
treeeb8655a9f1447ae3c5fe5ae73cae7c2b9340b3b2 /meson.build
parent99845e0e01eaa2120b10c22591c43c4305f5ba51 (diff)
build internal API docs with Meson
This commit adds the capability for building the Doxygen internal API docs in the Meson buildsystem, and also makes doing so the default for the internal-api-docs hydra job. Aside from the /nix-support directory, which differed only by the hash part of a store path, the outputs of hydraJobs.internal-api-docs before and after this commit were bit-for-bit identical on my machine. Change-Id: I98f0017891c25b06866c15f7652fe74f706ec8e1
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build21
1 files changed, 20 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 22739a4ab..cd264c16f 100644
--- a/meson.build
+++ b/meson.build
@@ -79,7 +79,25 @@ if not fs.is_absolute(sysconfdir)
sysconfdir = '/' / sysconfdir
endif
+# All of this has to go before the rest of the dependency checking,
+# so that internal-api-docs can be built with -Denable-build=false
+
enable_docs = get_option('enable-docs')
+enable_internal_api_docs = get_option('internal-api-docs')
+
+doxygen = find_program('doxygen', required : enable_internal_api_docs)
+bash = find_program('bash')
+
+rapidcheck_meson = dependency('rapidcheck', required : enable_internal_api_docs)
+
+if enable_internal_api_docs.enabled()
+ message('subdiring()')
+ subdir('doc/internal-api')
+endif
+
+if not get_option('enable-build')
+ subdir_done()
+endif
enable_tests = get_option('enable-tests')
@@ -223,6 +241,8 @@ lowdown = dependency('lowdown', version : '>=0.9.0', required : true)
deps += lowdown
# HACK(Qyriad): rapidcheck's pkg-config doesn't include the libs lol
+# Note: technically we 'check' for rapidcheck twice, for the internal-api-docs handling above,
+# but Meson will cache the result of the first one, and the required : arguments are different.
rapidcheck_meson = dependency('rapidcheck', required : enable_tests)
rapidcheck = declare_dependency(dependencies : rapidcheck_meson, link_args : ['-lrapidcheck'])
deps += rapidcheck
@@ -252,7 +272,6 @@ deps += lix_doc
#
# Build-time tools
#
-bash = find_program('bash')
coreutils = find_program('coreutils')
dot = find_program('dot', required : false)
pymod = import('python')