2023-08-12 19:27:20 +02:00
|
|
|
const std = @import("std");
|
|
|
|
|
|
|
|
pub fn build(b: *std.Build) void {
|
|
|
|
const target = b.standardTargetOptions(.{});
|
|
|
|
const optimize = b.standardOptimizeOption(.{});
|
|
|
|
|
|
|
|
const lib = b.addSharedLibrary(.{
|
2024-01-24 19:40:50 +01:00
|
|
|
.name = "mzte-mpv",
|
2023-08-12 19:27:20 +02:00
|
|
|
.root_source_file = .{ .path = "src/main.zig" },
|
|
|
|
.target = target,
|
|
|
|
.optimize = optimize,
|
|
|
|
});
|
|
|
|
|
|
|
|
lib.linkLibC();
|
|
|
|
|
|
|
|
const install_step = b.addInstallArtifact(lib, .{
|
|
|
|
// this is not a standard MPV installation path, but instead one that makes sense.
|
|
|
|
// this requires a symlink ../../../.local/share/mpv/scripts => ~/.config/mpv/scripts
|
|
|
|
.dest_dir = .{ .override = .{ .custom = "share/mpv/scripts" } },
|
2024-01-24 19:40:50 +01:00
|
|
|
.dest_sub_path = "mzte-mpv.so",
|
2023-08-12 19:27:20 +02:00
|
|
|
});
|
|
|
|
b.getInstallStep().dependOn(&install_step.step);
|
|
|
|
}
|