build.go (1483B)
1 package glfw 2 3 /* 4 // Windows Build Tags 5 // ---------------- 6 // GLFW Options: 7 #cgo windows CFLAGS: -D_GLFW_WIN32 -Iglfw/deps/mingw 8 9 // Linker Options: 10 #cgo windows LDFLAGS: -lopengl32 -lgdi32 11 12 13 // Darwin Build Tags 14 // ---------------- 15 // GLFW Options: 16 #cgo darwin CFLAGS: -D_GLFW_COCOA -Wno-deprecated-declarations 17 18 // Linker Options: 19 #cgo darwin LDFLAGS: -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo 20 21 22 // Linux Build Tags 23 // ---------------- 24 // GLFW Options: 25 #cgo linux,!wayland CFLAGS: -D_GLFW_X11 -D_GNU_SOURCE 26 #cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND -D_GNU_SOURCE 27 28 // Linker Options: 29 #cgo linux,!gles1,!gles2,!gles3,!vulkan LDFLAGS: -lGL 30 #cgo linux,gles1 LDFLAGS: -lGLESv1 31 #cgo linux,gles2 LDFLAGS: -lGLESv2 32 #cgo linux,gles3 LDFLAGS: -lGLESv3 33 #cgo linux,vulkan LDFLAGS: -lvulkan 34 #cgo linux,!wayland LDFLAGS: -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama -ldl -lrt 35 #cgo linux,wayland LDFLAGS: -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon -lm -ldl -lrt 36 37 // FreeBSD Build Tags 38 // ---------------- 39 // GLFW Options: 40 #cgo freebsd pkg-config: glfw3 41 #cgo freebsd CFLAGS: -D_GLFW_HAS_DLOPEN 42 #cgo freebsd,!wayland CFLAGS: -D_GLFW_X11 -D_GLFW_HAS_GLXGETPROCADDRESSARB 43 #cgo freebsd,wayland CFLAGS: -D_GLFW_WAYLAND 44 45 // Linker Options: 46 #cgo freebsd,!wayland LDFLAGS: -lm -lGL -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lXinerama 47 #cgo freebsd,wayland LDFLAGS: -lm -lGL -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon 48 */ 49 import "C"