diff options
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); |
