sokol: support compilation on OpenBSD (#14169)
parent
38afd74d26
commit
b9a0e2d285
|
@ -10,6 +10,7 @@ pub const (
|
||||||
#flag darwin -fobjc-arc
|
#flag darwin -fobjc-arc
|
||||||
#flag linux -lX11 -lGL -lXcursor -lXi -lpthread
|
#flag linux -lX11 -lGL -lXcursor -lXi -lpthread
|
||||||
#flag freebsd -L/usr/local/lib -lX11 -lGL -lXcursor -lXi
|
#flag freebsd -L/usr/local/lib -lX11 -lGL -lXcursor -lXi
|
||||||
|
#flag openbsd -L/usr/X11R6/lib -lX11 -lGL -lXcursor -lXi
|
||||||
#flag windows -lgdi32
|
#flag windows -lgdi32
|
||||||
// METAL
|
// METAL
|
||||||
$if macos {
|
$if macos {
|
||||||
|
@ -27,6 +28,7 @@ $if ios {
|
||||||
// OPENGL
|
// OPENGL
|
||||||
#flag linux -DSOKOL_GLCORE33
|
#flag linux -DSOKOL_GLCORE33
|
||||||
#flag freebsd -DSOKOL_GLCORE33
|
#flag freebsd -DSOKOL_GLCORE33
|
||||||
|
#flag openbsd -DSOKOL_GLCORE33
|
||||||
//#flag darwin -framework OpenGL -framework Cocoa -framework QuartzCore
|
//#flag darwin -framework OpenGL -framework Cocoa -framework QuartzCore
|
||||||
// D3D
|
// D3D
|
||||||
#flag windows -DSOKOL_GLCORE33
|
#flag windows -DSOKOL_GLCORE33
|
||||||
|
@ -41,6 +43,7 @@ $if ios {
|
||||||
#flag windows -DSOKOL_NO_ENTRY
|
#flag windows -DSOKOL_NO_ENTRY
|
||||||
#flag windows -DSOKOL_WIN32_FORCE_MAIN
|
#flag windows -DSOKOL_WIN32_FORCE_MAIN
|
||||||
#flag freebsd -DSOKOL_NO_ENTRY
|
#flag freebsd -DSOKOL_NO_ENTRY
|
||||||
|
#flag openbsd -DSOKOL_NO_ENTRY
|
||||||
#flag solaris -DSOKOL_NO_ENTRY
|
#flag solaris -DSOKOL_NO_ENTRY
|
||||||
// TODO end
|
// TODO end
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,8 @@ pub fn (mut t Table) parse_cflag(cflg string, mod string, ctimedefines []string)
|
||||||
return none
|
return none
|
||||||
}
|
}
|
||||||
mut fos := ''
|
mut fos := ''
|
||||||
mut allowed_os_overrides := ['linux', 'darwin', 'freebsd', 'windows', 'mingw', 'solaris']
|
mut allowed_os_overrides := ['linux', 'darwin', 'freebsd', 'openbsd', 'windows', 'mingw',
|
||||||
|
'solaris']
|
||||||
allowed_os_overrides << ctimedefines
|
allowed_os_overrides << ctimedefines
|
||||||
for os_override in allowed_os_overrides {
|
for os_override in allowed_os_overrides {
|
||||||
if !flag.starts_with(os_override) {
|
if !flag.starts_with(os_override) {
|
||||||
|
|
Loading…
Reference in New Issue