diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-11-05 12:39:00 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-11-05 12:39:00 +0100 |
commit | 4d639d934ec56b53e8f4776a7a0794f05b5451b6 (patch) | |
tree | 711f3f25e13cb60f3b393cc3440d328569c3c6d7 | |
parent | 602bc79e2461c45fde4703f70442cd17cb11d887 (diff) |
Update to latest zig version
-rw-r--r-- | build.zig | 151 |
1 files changed, 80 insertions, 71 deletions
@@ -47,17 +47,20 @@ fn buildXau(b: *std.Build, target: *const std.zig.CrossTarget, optimize: std.bui .optimize = optimize, }); - lib.addCSourceFiles(&[_][]const u8{ - "depends/libxcb/depends/libxau/AuDispose.c", - "depends/libxcb/depends/libxau/AuFileName.c", - "depends/libxcb/depends/libxau/AuGetAddr.c", - "depends/libxcb/depends/libxau/AuGetBest.c", - "depends/libxcb/depends/libxau/AuLock.c", - "depends/libxcb/depends/libxau/AuRead.c", - "depends/libxcb/depends/libxau/AuUnlock.c", - "depends/libxcb/depends/libxau/AuWrite.c", - }, &[_][]const u8{ - "-DHAVE_CONFIG_H", + lib.addCSourceFiles(.{ + .files = &.{ + "depends/libxcb/depends/libxau/AuDispose.c", + "depends/libxcb/depends/libxau/AuFileName.c", + "depends/libxcb/depends/libxau/AuGetAddr.c", + "depends/libxcb/depends/libxau/AuGetBest.c", + "depends/libxcb/depends/libxau/AuLock.c", + "depends/libxcb/depends/libxau/AuRead.c", + "depends/libxcb/depends/libxau/AuUnlock.c", + "depends/libxcb/depends/libxau/AuWrite.c", + }, + .flags = &.{ + "-DHAVE_CONFIG_H", + }, }); lib.addIncludePath(.{ .path = "depends/libxcb/depends/libxau" }); @@ -87,17 +90,20 @@ fn buildXdmcp(b: *std.Build, target: *const std.zig.CrossTarget, optimize: std.b } } - lib.addCSourceFiles(&[_][]const u8{ - "depends/libxcb/depends/libxdmcp/Array.c", - "depends/libxcb/depends/libxdmcp/Fill.c", - "depends/libxcb/depends/libxdmcp/Flush.c", - "depends/libxcb/depends/libxdmcp/Key.c", - "depends/libxcb/depends/libxdmcp/Read.c", - "depends/libxcb/depends/libxdmcp/Unwrap.c", - "depends/libxcb/depends/libxdmcp/Wrap.c", - "depends/libxcb/depends/libxdmcp/Wraphelp.c", - "depends/libxcb/depends/libxdmcp/Write.c", - }, flags.items); + lib.addCSourceFiles(.{ + .files = &.{ + "depends/libxcb/depends/libxdmcp/Array.c", + "depends/libxcb/depends/libxdmcp/Fill.c", + "depends/libxcb/depends/libxdmcp/Flush.c", + "depends/libxcb/depends/libxdmcp/Key.c", + "depends/libxcb/depends/libxdmcp/Read.c", + "depends/libxcb/depends/libxdmcp/Unwrap.c", + "depends/libxcb/depends/libxdmcp/Wrap.c", + "depends/libxcb/depends/libxdmcp/Wraphelp.c", + "depends/libxcb/depends/libxdmcp/Write.c", + }, + .flags = flags.items, + }); lib.addIncludePath(.{ .path = "depends/libxcb/depends/libxdmcp" }); lib.addIncludePath(.{ .path = "depends/libxcb/depends/libxdmcp/include" }); @@ -123,55 +129,58 @@ fn buildXcb(b: *std.Build, target: *const std.zig.CrossTarget, optimize: std.bui libXcb.linkLibrary(libXau); libXcb.linkLibrary(libXdmcp); - libXcb.addCSourceFiles(&[_][]const u8{ - "depends/libxcb/src/bigreq.c", - "depends/libxcb/src/composite.c", - "depends/libxcb/src/damage.c", - "depends/libxcb/src/dpms.c", - "depends/libxcb/src/dri2.c", - "depends/libxcb/src/dri3.c", - "depends/libxcb/src/ge.c", - "depends/libxcb/src/glx.c", - "depends/libxcb/src/present.c", - "depends/libxcb/src/randr.c", - "depends/libxcb/src/record.c", - "depends/libxcb/src/render.c", - "depends/libxcb/src/res.c", - "depends/libxcb/src/screensaver.c", - "depends/libxcb/src/shape.c", - "depends/libxcb/src/shm.c", - "depends/libxcb/src/sync.c", - "depends/libxcb/src/xcb_auth.c", - "depends/libxcb/src/xcb_conn.c", - "depends/libxcb/src/xcb_ext.c", - "depends/libxcb/src/xcb_in.c", - "depends/libxcb/src/xcb_list.c", - "depends/libxcb/src/xcb_out.c", - "depends/libxcb/src/xcb_util.c", - "depends/libxcb/src/xcb_xid.c", - "depends/libxcb/src/xc_misc.c", - "depends/libxcb/src/xevie.c", - "depends/libxcb/src/xf86dri.c", - "depends/libxcb/src/xfixes.c", - "depends/libxcb/src/xinerama.c", - "depends/libxcb/src/xinput.c", - "depends/libxcb/src/xkb.c", - "depends/libxcb/src/xprint.c", - "depends/libxcb/src/xproto.c", - "depends/libxcb/src/xselinux.c", - "depends/libxcb/src/xtest.c", - "depends/libxcb/src/xv.c", - "depends/libxcb/src/xvmc.c", - - // libxcb-keysyms - "depends/libxcb-keysyms/xcb/keysyms.c", - - // libxcb-render-util - "depends/libxcb-render-util/xcb/cache.c", - "depends/libxcb-render-util/xcb/glyph.c", - "depends/libxcb-render-util/xcb/util.c", - }, &[_][]const u8{ - "-DHAVE_CONFIG_H", + libXcb.addCSourceFiles(.{ + .files = &.{ + "depends/libxcb/src/bigreq.c", + "depends/libxcb/src/composite.c", + "depends/libxcb/src/damage.c", + "depends/libxcb/src/dpms.c", + "depends/libxcb/src/dri2.c", + "depends/libxcb/src/dri3.c", + "depends/libxcb/src/ge.c", + "depends/libxcb/src/glx.c", + "depends/libxcb/src/present.c", + "depends/libxcb/src/randr.c", + "depends/libxcb/src/record.c", + "depends/libxcb/src/render.c", + "depends/libxcb/src/res.c", + "depends/libxcb/src/screensaver.c", + "depends/libxcb/src/shape.c", + "depends/libxcb/src/shm.c", + "depends/libxcb/src/sync.c", + "depends/libxcb/src/xcb_auth.c", + "depends/libxcb/src/xcb_conn.c", + "depends/libxcb/src/xcb_ext.c", + "depends/libxcb/src/xcb_in.c", + "depends/libxcb/src/xcb_list.c", + "depends/libxcb/src/xcb_out.c", + "depends/libxcb/src/xcb_util.c", + "depends/libxcb/src/xcb_xid.c", + "depends/libxcb/src/xc_misc.c", + "depends/libxcb/src/xevie.c", + "depends/libxcb/src/xf86dri.c", + "depends/libxcb/src/xfixes.c", + "depends/libxcb/src/xinerama.c", + "depends/libxcb/src/xinput.c", + "depends/libxcb/src/xkb.c", + "depends/libxcb/src/xprint.c", + "depends/libxcb/src/xproto.c", + "depends/libxcb/src/xselinux.c", + "depends/libxcb/src/xtest.c", + "depends/libxcb/src/xv.c", + "depends/libxcb/src/xvmc.c", + + // libxcb-keysyms + "depends/libxcb-keysyms/xcb/keysyms.c", + + // libxcb-render-util + "depends/libxcb-render-util/xcb/cache.c", + "depends/libxcb-render-util/xcb/glyph.c", + "depends/libxcb-render-util/xcb/util.c", + }, + .flags = &.{ + "-DHAVE_CONFIG_H", + } }); libXcb.addIncludePath(.{ .path = "depends/libxcb/src" }); |