const std = @import("std"); pub fn build(b: *std.Build) void { const target = b.standardTargetOptions(.{}); const optimize = b.standardOptimizeOption(.{}); // It's also possible to define more custom flags to toggle optional features // of this build script using `b.option()`. All defined flags (including // target and optimize options) will be listed when running `zig build --help` // in this directory. const llvm = b.option(bool, "llvm", "Build with llvm"); const mod = b.addModule("puzzle", .{ .root_source_file = b.path("src/root.zig"), .target = target, }); mod.addIncludePath(b.path("src")); const exe = b.addExecutable(.{ .name = "wl-main", .use_llvm = llvm, .root_module = b.createModule(.{ .root_source_file = b.path("src/main.zig"), .target = target, .optimize = optimize, .imports = &.{ .{ .name = "puzzle", .module = mod }, }, }), }); exe.root_module.link_libc = true; exe.root_module.linkSystemLibrary("wayland-client", .{}); exe.root_module.linkSystemLibrary("xkbcommon", .{}); exe.root_module.addIncludePath(b.path("src")); exe.root_module.addCSourceFiles(.{ .language = .c, .files = &.{ "src/xdg-shell.c", }, }); b.installArtifact(exe); }