-
Notifications
You must be signed in to change notification settings - Fork 20
Using FreeBSD
It is possible to build and use ZT with FreeBSD, with some caveats.
Using X11 / GLFW, the usual BSD problem arrises with using the linjoystick code, so the following workarounds apply :
In fn glLibrary() .. where it reads if (target.isLinux())
-> if (target.isLinux() or target.isFreeBSD())
to pickup the gl lib.
In fn glfwLibrary() ... copypaste the whole if (target.isLinux())
block to make a if (target.isFreeBSD())
block with the same content.
Comment out the line that reads
path ++ "src/dep/glfw/src/linux_joystick.c",
Inject a couple of NULL functions to satisfy the linker
namely :
GLFWAPI void _glfwPlatformUpdateGamepadGUID(char *)
{
// nop
}
GLFWAPI int _glfwPlatformPollJoystick(_GLFWjoystick *, int)
{
return GLFW_FALSE;
}
That will give you a working ZT install that passes zig build
without compilation errors. It just wont have Gamepad or Joystick support. (Thats an upstream issue with GLFW)