diff options
| author | s-ol <s+removethis@s-ol.nu> | 2025-03-10 17:28:29 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-15 13:05:19 +0000 |
| commit | 7a7e0909fd016b95f70448f227c251a5a7da8423 (patch) | |
| tree | d68ae85cee257205d710f281077dbb9e73107a10 /build.zig | |
| parent | fix conditional compilation (diff) | |
| download | glsl-view-7a7e0909fd016b95f70448f227c251a5a7da8423.tar.gz glsl-view-7a7e0909fd016b95f70448f227c251a5a7da8423.zip | |
texture-share-vk output support
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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); |
