Added gstreamer app to build tree
This commit is contained in:
parent
f7a5497f0c
commit
2a36a68ebe
2 changed files with 9 additions and 0 deletions
|
@ -25,6 +25,7 @@ pub fn build(b: *std.Build) void {
|
||||||
|
|
||||||
// These environment vars are set with the `nix develop` command
|
// These environment vars are set with the `nix develop` command
|
||||||
const gst_dev_path = b.graph.env_map.get("GST_DEV_PATH");
|
const gst_dev_path = b.graph.env_map.get("GST_DEV_PATH");
|
||||||
|
const gst_plugins_base_path = b.graph.env_map.get("GST_PLUGINS_BASE_PATH");
|
||||||
const glib_dev_path = b.graph.env_map.get("GLIB_DEV_PATH");
|
const glib_dev_path = b.graph.env_map.get("GLIB_DEV_PATH");
|
||||||
const glib_path = b.graph.env_map.get("GLIB_PATH");
|
const glib_path = b.graph.env_map.get("GLIB_PATH");
|
||||||
|
|
||||||
|
@ -32,6 +33,10 @@ pub fn build(b: *std.Build) void {
|
||||||
std.debug.panic("GST_DEV_PATH environment variable was not set. Has the nix flake been updated? This should point at the gstreamer.XXX-dev folder", .{});
|
std.debug.panic("GST_DEV_PATH environment variable was not set. Has the nix flake been updated? This should point at the gstreamer.XXX-dev folder", .{});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gst_plugins_base_path == null) {
|
||||||
|
std.debug.panic("GST_PLUGINS_DEV_PATH environment variable was not set. Has the nix flake been updated? This should point at the gst_all_1.gst-plugins-base.dev folder", .{});
|
||||||
|
}
|
||||||
|
|
||||||
if (glib_dev_path == null) {
|
if (glib_dev_path == null) {
|
||||||
std.debug.panic("GLIB_DEV_PATH environment variable was not set. Has the nix flake been updated? This should point at the glib.XXX-dev folder", .{});
|
std.debug.panic("GLIB_DEV_PATH environment variable was not set. Has the nix flake been updated? This should point at the glib.XXX-dev folder", .{});
|
||||||
}
|
}
|
||||||
|
@ -43,6 +48,7 @@ pub fn build(b: *std.Build) void {
|
||||||
exe.linkSystemLibrary("c");
|
exe.linkSystemLibrary("c");
|
||||||
exe.addIncludePath(.{ .cwd_relative = b.fmt("{s}/include/gstreamer-1.0", .{gst_dev_path.?}) }); // not sure why both are needed, but
|
exe.addIncludePath(.{ .cwd_relative = b.fmt("{s}/include/gstreamer-1.0", .{gst_dev_path.?}) }); // not sure why both are needed, but
|
||||||
exe.addIncludePath(.{ .cwd_relative = b.fmt("{s}/include/gstreamer-1.0/gst", .{gst_dev_path.?}) }); // it won't compile without them
|
exe.addIncludePath(.{ .cwd_relative = b.fmt("{s}/include/gstreamer-1.0/gst", .{gst_dev_path.?}) }); // it won't compile without them
|
||||||
|
exe.addIncludePath(.{ .cwd_relative = b.fmt("{s}/include/gstreamer-1.0/gst/app", .{gst_plugins_base_path.?}) }); // gstreamer-appsink
|
||||||
exe.addIncludePath(.{ .cwd_relative = b.fmt("{s}/include/glib-2.0", .{glib_dev_path.?}) });
|
exe.addIncludePath(.{ .cwd_relative = b.fmt("{s}/include/glib-2.0", .{glib_dev_path.?}) });
|
||||||
exe.addIncludePath(.{ .cwd_relative = b.fmt("{s}/lib/glib-2.0/include", .{glib_path.?}) });
|
exe.addIncludePath(.{ .cwd_relative = b.fmt("{s}/lib/glib-2.0/include", .{glib_path.?}) });
|
||||||
|
|
||||||
|
@ -53,6 +59,7 @@ pub fn build(b: *std.Build) void {
|
||||||
|
|
||||||
|
|
||||||
exe.linkSystemLibrary("gstreamer-1.0");
|
exe.linkSystemLibrary("gstreamer-1.0");
|
||||||
|
exe.linkSystemLibrary("gstreamer-app-1.0");
|
||||||
exe.linkSystemLibrary("glib-2.0");
|
exe.linkSystemLibrary("glib-2.0");
|
||||||
exe.linkSystemLibrary("gobject-2.0");
|
exe.linkSystemLibrary("gobject-2.0");
|
||||||
|
|
||||||
|
|
|
@ -26,10 +26,12 @@
|
||||||
gst_all_1.gstreamer
|
gst_all_1.gstreamer
|
||||||
gst_all_1.gstreamer.dev
|
gst_all_1.gstreamer.dev
|
||||||
gst_all_1.gst-plugins-base
|
gst_all_1.gst-plugins-base
|
||||||
|
gst_all_1.gst-plugins-base.dev
|
||||||
gst_all_1.gst-plugins-good
|
gst_all_1.gst-plugins-good
|
||||||
];
|
];
|
||||||
|
|
||||||
GST_DEV_PATH = pkgs.gst_all_1.gstreamer.dev;
|
GST_DEV_PATH = pkgs.gst_all_1.gstreamer.dev;
|
||||||
|
GST_PLUGINS_BASE_PATH = pkgs.gst_all_1.gst-plugins-base.dev;
|
||||||
GLIB_DEV_PATH = pkgs.glib.dev;
|
GLIB_DEV_PATH = pkgs.glib.dev;
|
||||||
GLIB_PATH = pkgs.glib.out;
|
GLIB_PATH = pkgs.glib.out;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue