Skip to content

Commit

Permalink
workaround for #9
Browse files Browse the repository at this point in the history
  • Loading branch information
jayrod246 committed Apr 17, 2024
1 parent 311651a commit 8947e9d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/zig-cache
/zig-out
/zig-out
/generated
18 changes: 15 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,28 @@ pub fn build(b: *std.Build) void {
exe.addIncludePath(b.path("src/studio"));
exe.addCSourceFiles(.{ .files = open3dmm_sources, .flags = open3dmm_flags });

const kauai_dep = @"open3dmm-core_dep".builder.dependency("kauai", .{
.target = target,
.optimize = optimize,
});

const copy_files = b.addWriteFiles();
copy_files.addCopyFileToSource(@"open3dmm-core_dep".path("inc/socdef.h"), "generated/core/socdef.h");
copy_files.addCopyFileToSource(kauai_dep.path("kauai/src/frameres.h"), "generated/frameres.h");
copy_files.addCopyFileToSource(kauai_dep.path("kauai/src/framedef.h"), "generated/framedef.h");
copy_files.addCopyFileToSource(kauai_dep.path("kauai/src/frame.rc"), "generated/frame.rc");
exe.step.dependOn(&copy_files.step);

exe.addWin32ResourceFile(.{
.file = b.path("src/studio/utest.rc"),
.flags = &.{
"/y",
"/i",
b.pathFromRoot("inc"),
"inc",
"/i",
b.getInstallPath(.header, ""),
"generated",
"/i",
b.pathFromRoot("src"),
"src",
},
});

Expand Down

0 comments on commit 8947e9d

Please sign in to comment.