aboutsummaryrefslogtreecommitdiffstats
path: root/build.zig
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2025-03-10 17:28:29 +0000
committers-ol <s+removethis@s-ol.nu>2025-03-15 13:05:19 +0000
commit7a7e0909fd016b95f70448f227c251a5a7da8423 (patch)
treed68ae85cee257205d710f281077dbb9e73107a10 /build.zig
parentfix conditional compilation (diff)
downloadglsl-view-7a7e0909fd016b95f70448f227c251a5a7da8423.tar.gz
glsl-view-7a7e0909fd016b95f70448f227c251a5a7da8423.zip
texture-share-vk output support
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/build.zig b/build.zig
index 449c82e..30aea09 100644
--- a/build.zig
+++ b/build.zig
@@ -5,7 +5,8 @@ pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const have_ffmpeg = b.option(bool, "textures", "enable texture/video support (needs ffmpeg)") orelse true;
- const have_hap = have_ffmpeg and b.option(bool, "hap", "enable HAP GPU upload support (need snappy)") orelse true;
+ const have_hap = have_ffmpeg and b.option(bool, "hap", "enable HAP GPU upload support (needs snappy)") orelse true;
+ const have_tsv = b.option(bool, "texture-share-vk", "enable GPU image sharing (needs texture-share-vk)") orelse false;
const exe = b.addExecutable(.{
.name = "glsl-view",
@@ -17,6 +18,7 @@ pub fn build(b: *std.Build) void {
const options = b.addOptions();
options.addOption(bool, "have_ffmpeg", have_ffmpeg);
options.addOption(bool, "have_hap", have_hap);
+ options.addOption(bool, "have_tsv", have_tsv);
exe.root_module.addOptions("build_config", options);
exe.linkLibC();
@@ -38,6 +40,10 @@ pub fn build(b: *std.Build) void {
exe.linkSystemLibrary("snappy");
}
+ if (have_tsv) {
+ exe.linkSystemLibrary("texture_share_gl_client");
+ }
+
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);