From 170ace6fa333fed096fdf75d1b5aa654afbf2b65 Mon Sep 17 00:00:00 2001 From: Nicholas Young Date: Fri, 11 Oct 2024 17:00:19 -0700 Subject: [PATCH] fixed system lib positions --- build.zig | 6 ++++-- src/main.zig | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index 5d7e6e0..134ee70 100644 --- a/build.zig +++ b/build.zig @@ -45,13 +45,15 @@ pub fn build(b: *std.Build) void { 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/glib-2.0", .{glib_dev_path.?}) }); exe.addIncludePath(.{ .cwd_relative = b.fmt("{s}/lib/glib-2.0/include", .{glib_path.?}) }); - exe.addIncludePath(.{ .cwd_relative = "lib/hailo" }); + + exe.addIncludePath(.{ .cwd_relative = "/usr/include/hailo" }); + exe.addLibraryPath(.{ .cwd_relative = "/usr/lib"}); + exe.linkSystemLibrary("hailort"); exe.linkSystemLibrary("gstreamer-1.0"); exe.linkSystemLibrary("glib-2.0"); exe.linkSystemLibrary("gobject-2.0"); - exe.linkSystemLibrary("hailo"); // This declares intent for the executable to be installed into the // standard location when the user invokes the "install" step (the default diff --git a/src/main.zig b/src/main.zig index d67a869..2d49c88 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1,7 +1,7 @@ const std = @import("std"); const hlo = @cImport({ - @cInclude("hlort.h"); + @cInclude("hailort.h"); }); const Allocator = std.mem.Allocator;