windows: hatred rising
The lib files are of course stubs and not actually static libraries, which means we have to distribute the DLL as well. Unfortunately. Incredibly bad operating system. If this doesn't work, I quit.
This commit is contained in:
parent
f1480bca45
commit
011f300f0a
23
build.zig
23
build.zig
@ -18,12 +18,23 @@ pub fn build(b: *std.Build) void {
|
||||
});
|
||||
|
||||
if (target.result.os.tag == .windows) {
|
||||
if (target.result.cpu.arch == .x86)
|
||||
exe.addObjectFile(b.path("deps/labjack/windows/ljackuw32.lib"))
|
||||
else if (target.result.cpu.arch == .x86_64)
|
||||
exe.addObjectFile(b.path("deps/labjack/windows/ljackuw64.lib"))
|
||||
else
|
||||
@panic("Unsupported CPU arch for Windows build (must be x86 or x86_64).");
|
||||
if (target.result.cpu.arch == .x86) {
|
||||
exe.addObjectFile(b.path("deps/labjack/windows/ljackuw32.lib"));
|
||||
b.getInstallStep().dependOn(
|
||||
&b.addInstallBinFile(
|
||||
b.path("deps/labjack/windows/ljackuw32.dll"),
|
||||
"ljackuw.dll",
|
||||
).step,
|
||||
);
|
||||
} else if (target.result.cpu.arch == .x86_64) {
|
||||
exe.addObjectFile(b.path("deps/labjack/windows/ljackuw64.lib"));
|
||||
b.getInstallStep().dependOn(
|
||||
&b.addInstallBinFile(
|
||||
b.path("deps/labjack/windows/ljackuw64.dll"),
|
||||
"ljackuw.dll",
|
||||
).step,
|
||||
);
|
||||
} else @panic("Unsupported CPU arch for Windows build (must be x86 or x86_64).");
|
||||
} else {
|
||||
const ljacklm_dep = b.dependency(
|
||||
"ljacklm",
|
||||
|
BIN
deps/labjack/windows/ljackuw32.dll
vendored
Normal file
BIN
deps/labjack/windows/ljackuw32.dll
vendored
Normal file
Binary file not shown.
BIN
deps/labjack/windows/ljackuw64.dll
vendored
Normal file
BIN
deps/labjack/windows/ljackuw64.dll
vendored
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user