add raylib dependency and desktop platform driver with interactive play mode
This commit is contained in:
@@ -38,7 +38,6 @@ pub fn build(b: *std.Build) void {
|
||||
.root_source_file = b.path("src/platform/root.zig"),
|
||||
});
|
||||
platform_mod.addImport("contract", contract_mod);
|
||||
|
||||
const frontend_mod = b.createModule(.{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
@@ -63,6 +62,23 @@ pub fn build(b: *std.Build) void {
|
||||
.root_module = exe_mod,
|
||||
});
|
||||
|
||||
if (b.lazyDependency("raylib", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
})) |raylib_dep| {
|
||||
const raylib_lib = raylib_dep.artifact("raylib");
|
||||
exe_mod.linkLibrary(raylib_lib);
|
||||
|
||||
const raylib_c = b.addTranslateC(.{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.root_source_file = raylib_dep.path("src/raylib.h"),
|
||||
});
|
||||
const craylib_mod = raylib_c.createModule();
|
||||
platform_mod.addImport("c_raylib", craylib_mod);
|
||||
exe_mod.addImport("c_raylib", craylib_mod);
|
||||
}
|
||||
|
||||
b.installArtifact(exe);
|
||||
|
||||
// Test Step Configuration
|
||||
|
||||
Reference in New Issue
Block a user