summaryrefslogtreecommitdiff
path: root/src/Addon.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Addon.zig')
-rw-r--r--src/Addon.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Addon.zig b/src/Addon.zig
index 67939f57..fa41f774 100644
--- a/src/Addon.zig
+++ b/src/Addon.zig
@@ -179,7 +179,13 @@ var nfound: usize = 0;
/// the image and pdf modules' `pardes_addon` declarations, which only a
/// library exports. A static binary cannot dlopen, and the loader below
/// is Linux's (a memfd): this is how either has image and PDF panes.
-const compiled_in: []const *const Kind.Ops = if (@import("builtin_addons").on) &.{ &@import("image_addon").pardes_addon, &@import("pdf_addon").pardes_addon } else &.{};
+/// A build with -Dpdf=false has the image addon alone.
+const compiled_in: []const *const Kind.Ops = if (!@import("builtin_addons").on)
+ &.{}
+else if (@import("builtin_addons").pdf)
+ &.{ &@import("image_addon").pardes_addon, &@import("pdf_addon").pardes_addon }
+else
+ &.{&@import("image_addon").pardes_addon};
/// The addons compiled in, as if loaded (`builtin` their path); else every
/// library of the two directories, in name order each, the user's first. A