all: build: organize build files and reduce unreachables (#567)

This commit is contained in:
Ali Chraghi 2022-09-25 20:32:51 +03:30 committed by GitHub
parent cc301493ca
commit fcb82345d4
Failed to generate hash of commit
10 changed files with 434 additions and 419 deletions

View file

@ -10,6 +10,19 @@ pub const pkg = std.build.Pkg{
},
};
pub const Options = struct {
encoder: ?EncoderOptions,
transcoder: ?TranscoderOptions,
};
pub const EncoderOptions = struct {
install_libs: bool = false,
};
pub const TranscoderOptions = struct {
install_libs: bool = false,
};
pub fn build(b: *Builder) void {
const mode = b.standardReleaseOptions();
const target = b.standardTargetOptions(.{});
@ -82,19 +95,6 @@ pub fn buildTranscoder(b: *Builder, target: std.zig.CrossTarget, options: Transc
return transcoder;
}
pub const Options = struct {
encoder: ?EncoderOptions,
transcoder: ?TranscoderOptions,
};
pub const EncoderOptions = struct {
install_libs: bool = false,
};
pub const TranscoderOptions = struct {
install_libs: bool = false,
};
fn thisDir() []const u8 {
return std.fs.path.dirname(@src().file) orelse ".";
}