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:
torque 2024-07-10 22:28:49 -07:00
parent f1480bca45
commit 011f300f0a
Signed by: torque
SSH Key Fingerprint: SHA256:nCrXefBNo6EbjNSQhv0nXmEg/VuNq3sMF5b8zETw3Tk
3 changed files with 17 additions and 6 deletions

View File

@ -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

Binary file not shown.

BIN
deps/labjack/windows/ljackuw64.dll vendored Normal file

Binary file not shown.