Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.3/glfw: add openbsd support #336

Merged
merged 5 commits into from
Oct 23, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 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 freebsd openbsd pkg-config: glfw3
#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
#cgo openbsd CFLAGS: -I/usr/X11R6/include
hajimehoshi marked this conversation as resolved.
Show resolved Hide resolved

// 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: -L/usr/X11R6/lib -lm -lX11 -lxcb -lXau -lXdmcp
ilylily marked this conversation as resolved.
Show resolved Hide resolved
*/
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