Skip to content

Commit

Permalink
v3.3/glfw: add openbsd support (#336)
Browse files Browse the repository at this point in the history
partially fixes #288
  • Loading branch information
ilylily authored Oct 23, 2021
1 parent 0db043d commit 6ad59d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions v3.3/glfw/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,18 @@ package glfw
#cgo linux,!wayland LDFLAGS: -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama -ldl -lrt
#cgo linux,wayland LDFLAGS: -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon -lm -ldl -lrt
// FreeBSD Build Tags
// BSD Build Tags
// ----------------
// GLFW Options:
#cgo freebsd pkg-config: glfw3
#cgo freebsd CFLAGS: -D_GLFW_HAS_DLOPEN
#cgo freebsd,!wayland CFLAGS: -D_GLFW_X11 -D_GLFW_HAS_GLXGETPROCADDRESSARB
#cgo openbsd pkg-config: x11 xau xcb xdmcp
#cgo freebsd openbsd CFLAGS: -D_GLFW_HAS_DLOPEN
#cgo freebsd,!wayland openbsd CFLAGS: -D_GLFW_X11 -D_GLFW_HAS_GLXGETPROCADDRESSARB
#cgo freebsd,wayland CFLAGS: -D_GLFW_WAYLAND
// Linker Options:
#cgo freebsd,!wayland LDFLAGS: -lm -lGL -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lXinerama
#cgo freebsd,wayland LDFLAGS: -lm -lGL -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon
#cgo openbsd LDFLAGS: -lm
*/
import "C"
2 changes: 1 addition & 1 deletion v3.3/glfw/c_glfw_freebsd.go → v3.3/glfw/c_glfw_bsd.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build freebsd
// +build freebsd openbsd

package glfw

Expand Down
2 changes: 1 addition & 1 deletion v3.3/glfw/native_linbsd.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build linux,!wayland freebsd,!wayland
// +build linux,!wayland freebsd,!wayland openbsd

package glfw

Expand Down

0 comments on commit 6ad59d9

Please sign in to comment.