chore: Update to Zig v0.11.0
This commit is contained in:
parent
1fa5c9675f
commit
2e4f8d1409
16
build.zig
16
build.zig
|
@ -112,8 +112,10 @@ pub fn package(
|
||||||
}, cflags);
|
}, cflags);
|
||||||
},
|
},
|
||||||
.glfw_opengl3 => {
|
.glfw_opengl3 => {
|
||||||
zgui_c_cpp.addCSourceFile(thisDir() ++ "/libs/imgui/backends/imgui_impl_glfw.cpp", cflags);
|
zgui_c_cpp.addCSourceFiles(&.{
|
||||||
zgui_c_cpp.addCSourceFile(thisDir() ++ "/libs/imgui/backends/imgui_impl_opengl3.cpp", cflags);
|
thisDir() ++ "/libs/imgui/backends/imgui_impl_glfw.cpp",
|
||||||
|
thisDir() ++ "/libs/imgui/backends/imgui_impl_opengl3.cpp",
|
||||||
|
}, cflags);
|
||||||
},
|
},
|
||||||
.win32_dx12 => {
|
.win32_dx12 => {
|
||||||
zgui_c_cpp.addCSourceFiles(&.{
|
zgui_c_cpp.addCSourceFiles(&.{
|
||||||
|
@ -135,7 +137,9 @@ pub fn package(
|
||||||
defer b.allocator.free(vcpkg_triplet);
|
defer b.allocator.free(vcpkg_triplet);
|
||||||
|
|
||||||
const include_path = b.pathJoin(&.{ b.vcpkg_root.found, "installed", vcpkg_triplet, "include", "SDL2" });
|
const include_path = b.pathJoin(&.{ b.vcpkg_root.found, "installed", vcpkg_triplet, "include", "SDL2" });
|
||||||
zgui_c_cpp.include_dirs.append(.{ .raw_path = include_path }) catch @panic("out of memory");
|
|
||||||
|
// What's the difference between a IncludeDir "path" and "path_system"?
|
||||||
|
zgui_c_cpp.include_dirs.append(.{ .path = .{ .path = include_path } }) catch @panic("out of memory");
|
||||||
|
|
||||||
const bin_path = zgui_c_cpp.vcpkg_bin_path orelse @panic("vcpkg paths were found, so vcpkg_bin_path should be set ");
|
const bin_path = zgui_c_cpp.vcpkg_bin_path orelse @panic("vcpkg paths were found, so vcpkg_bin_path should be set ");
|
||||||
const dll_path = std.fs.path.join(b.allocator, &.{ bin_path, "SDL2.dll" }) catch @panic("out of memory");
|
const dll_path = std.fs.path.join(b.allocator, &.{ bin_path, "SDL2.dll" }) catch @panic("out of memory");
|
||||||
|
@ -146,8 +150,10 @@ pub fn package(
|
||||||
|
|
||||||
zgui_c_cpp.linkSystemLibrary("SDL2");
|
zgui_c_cpp.linkSystemLibrary("SDL2");
|
||||||
|
|
||||||
zgui_c_cpp.addCSourceFile(thisDir() ++ "/libs/imgui/backends/imgui_impl_sdl.cpp", cflags);
|
zgui_c_cpp.addCSourceFiles(&.{
|
||||||
zgui_c_cpp.addCSourceFile(thisDir() ++ "/libs/imgui/backends/imgui_impl_opengl3.cpp", cflags);
|
thisDir() ++ "/libs/imgui/backends/imgui_impl_sdl.cpp",
|
||||||
|
thisDir() ++ "/libs/imgui/backends/imgui_impl_opengl3.cpp",
|
||||||
|
}, cflags);
|
||||||
},
|
},
|
||||||
.no_backend => {},
|
.no_backend => {},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue