Skip to content
Merged
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ The projects is structured into modules, each module is a separate library that
* `sdp` - [SDP (Session Description Protocol)](https://datatracker.ietf.org/doc/html/rfc4566) implementation for describing multimedia sessions based on RFC 4566.
* `rtsp` - [RTSP (Real Time Streaming Protocol)](https://datatracker.ietf.org/doc/html/rfc2326) implementation for controlling streaming media servers based on RFC 2326.
* `stun` - [STUN (Session Traversal Utilities for NAT)](https://datatracker.ietf.org/doc/html/rfc8489) implementation for NAT traversal based on RFC 8489.
* `ice` - [ICE (Interactive Connectivity Establishment)](https://datatracker.ietf.org/doc/html/rfc8445) implementation for NAT traversal based on RFC 8445.
19 changes: 18 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});

const translate_c = b.addTranslateC(.{
.root_source_file = b.path("src/ice/c.h"),
.target = target,
.optimize = optimize,
});

const ice = b.addModule("ice", .{
.root_source_file = b.path("src/ice/ice.zig"),
.target = target,
.optimize = optimize,
.imports = &.{
.{ .name = "stun", .module = stun },
.{ .name = "c", .module = translate_c.createModule() },
},
.link_libc = true,
});
_ = b.addModule("protocols", .{
.root_source_file = b.path("src/root.zig"),
.target = target,
Expand All @@ -52,12 +68,13 @@ pub fn build(b: *std.Build) void {
.{ .name = "sdp", .module = sdp },
.{ .name = "rtsp", .module = rtsp },
.{ .name = "stun", .module = stun },
.{ .name = "ice", .module = ice },
},
});

{
const test_filters = b.option([]const []const u8, "test-filter", "Skip tests that do not match any filter") orelse &[0][]const u8{};
const modules = [_]*std.Build.Module{ rtp, rtcp, sdp, rtsp, stun };
const modules = [_]*std.Build.Module{ rtp, rtcp, sdp, rtsp, stun, ice };
const test_step = b.step("test", "Run tests");

inline for (modules) |sub_module| {
Expand Down
Loading
Loading