glfw: add Windows x86_64 support
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
c4470e1a14
commit
45125bec55
1 changed files with 8 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ pub fn link(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void
|
||||||
var abs_path = std.fs.path.join(&arena.allocator, &.{ thisDir(), path }) catch unreachable;
|
var abs_path = std.fs.path.join(&arena.allocator, &.{ thisDir(), path }) catch unreachable;
|
||||||
sources.append(abs_path) catch unreachable;
|
sources.append(abs_path) catch unreachable;
|
||||||
}
|
}
|
||||||
lib.addCSourceFiles(sources.items, &.{});
|
lib.addCSourceFiles(sources.items, &.{"-D_GLFW_WIN32"});
|
||||||
},
|
},
|
||||||
.macos => {
|
.macos => {
|
||||||
includeSdkMacOS(b, lib);
|
includeSdkMacOS(b, lib);
|
||||||
|
|
@ -174,8 +174,14 @@ fn linkGLFW(b: *Builder, step: *std.build.LibExeObjStep, options: Options) void
|
||||||
const target = (std.zig.system.NativeTargetInfo.detect(b.allocator, step.target) catch unreachable).target;
|
const target = (std.zig.system.NativeTargetInfo.detect(b.allocator, step.target) catch unreachable).target;
|
||||||
switch (target.os.tag) {
|
switch (target.os.tag) {
|
||||||
.windows => {
|
.windows => {
|
||||||
// TODO(slimsag): create sdk-windows
|
|
||||||
step.linkSystemLibrary("c");
|
step.linkSystemLibrary("c");
|
||||||
|
step.linkSystemLibrary("gdi32");
|
||||||
|
if (options.opengl) {
|
||||||
|
step.linkFramework("opengl32");
|
||||||
|
}
|
||||||
|
if (options.gles) {
|
||||||
|
step.linkFramework("GLESv2");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
.macos => {
|
.macos => {
|
||||||
includeSdkMacOS(b, step);
|
includeSdkMacOS(b, step);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue