#Getting a file from a dependency

1 messages · Page 1 of 1 (latest)

next lichen
#

Hello! I use zig as a build system for my "Hello world" src/main.cpp file

In build.zig.zon I specified a C++ dependency (1 hpp file)

// https://github.com/levovix0/ConsoleArgs
.dependencies = .{
         .args = .{
             .url = "https://github.com/levovix0/ConsoleArgs/archive/bd73e79f2fb419f0729aaeeb9aab346e4b63bbf8.tar.gz",
             .hash = "1220a3e6a15e2bad70d064b0ce91a16f11e80e8006a1b968595c6169b65bd8a6ac5d",
         },
     },

I use a dependency in build.zig

  const consoleargs = b.dependency("args", .{});

Can I get the ConsoleArgs.hpp file from the dependency so that I can then connect it via **exe.addCSourceFile **or something else.
Or make a build from dependency files without forking the project and adding **build.zig **with addModule() there?

scarlet folio
#

you can get the file path as a lazy path using consoleargs.path("ConsoleArgs.hpp")