Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest zigwin32 #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceRoot}/zig-out/bin/softlogo.exe",
"cwd": "${workspaceRoot}"
}
]
}
17 changes: 12 additions & 5 deletions build.zig
Original file line number Diff line number Diff line change
@@ -2,12 +2,16 @@ const std = @import("std");
const Builder = std.build.Builder;
const CrossTarget = std.zig.CrossTarget;
const Mode = std.builtin.Mode;
// const deps = @import("./deps.zig");
const FileSource = std.build.FileSource;
const Pkg = std.build.Pkg;


fn buildSoftlogo(b: *Builder, target: CrossTarget, mode: Mode) void {
const softlogo = b.addExecutable("softlogo", "examples/softlogo.zig");
// deps.addAllTo(softlogo);
softlogo.addPackagePath("zwl", "src/zwl.zig");
const win32 = Pkg{ .name = "win32", .source = FileSource.relative("libs/zigwin32/win32.zig") };
const zwl = Pkg{ .name = "zwl", .source = FileSource.relative("src/zwl.zig"), .dependencies = &.{win32} };
softlogo.addPackage(win32);
softlogo.addPackage(zwl);
softlogo.single_threaded = true;
softlogo.subsystem = .Windows;
softlogo.setTarget(target);
@@ -35,6 +39,9 @@ pub fn build(b: *Builder) void {
const target = b.standardTargetOptions(.{});
const mode = b.standardReleaseOptions();

buildWayland(b, target, mode);
buildSoftlogo(b, target, mode);
if (target.isWindows()) {
buildSoftlogo(b, target, mode);
} else if (target.isLinux()) {
buildWayland(b, target, mode);
}
}
2 changes: 1 addition & 1 deletion libs/zigwin32
Submodule zigwin32 updated 318 files
Loading