fix build on linux

This commit is contained in:
Mitchell Hashimoto
2023-10-01 17:32:59 -07:00
parent ccd6eee5fe
commit 3a4842a0a5
3 changed files with 12 additions and 5 deletions

View File

@ -855,6 +855,13 @@ fn addSystemSDK(
try @import("apple_sdk").addPaths(b, step);
}
if (step.target.isLinux()) {
step.linkLibrary(b.dependency("x11_headers", .{
.target = step.target,
.optimize = step.optimize,
}).artifact("x11-headers"));
}
// GLFW requires these on all platforms so we just add them here. It
// doesn't hurt to add them if we don't use GLFW since they're all
// namespaced.
@ -862,10 +869,6 @@ fn addSystemSDK(
.target = step.target,
.optimize = step.optimize,
}).artifact("vulkan-headers"));
// step.linkLibrary(b.dependency("x11_headers", .{
// .target = step.target,
// .optimize = step.optimize,
// }).artifact("x11-headers"));
}
fn benchSteps(

View File

@ -42,5 +42,9 @@
.url = "https://pkg.machengine.org/vulkan-headers/fc495148a910ac7817ce0ec2d5948231806f2ac0.tar.gz",
.hash = "12209aeba80369fa8638b82179b47e6742adb98a3a5b01bc518565504a922baad3e4",
},
.x11_headers = .{
.url = "https://pkg.machengine.org/x11-headers/26d12e9fc0d893085bcb711088a4a19afdff1adc.tar.gz",
.hash = "1220371a61d8bb57fce8ee1741f623cc19b0edd7d1b4adc9918663f8a7ef08aa4f3f",
},
},
}

View File

@ -165,7 +165,7 @@ pub fn build(b: *std.Build) !void {
lib.installHeadersDirectoryOptions(.{
.source_dir = upstream.path("fontconfig"),
.install_dir = .header,
.install_subdir = "",
.install_subdir = "fontconfig",
.include_extensions = &.{".h"},
});