Add support for SDL3

This commit is contained in:
Milan Nikolic 2024-12-03 09:06:39 +01:00
parent 5df9325f63
commit ea071de5c2
No known key found for this signature in database
GPG key ID: 9229D0EAA3AA4E75
21 changed files with 88 additions and 50 deletions

View file

@ -1,12 +1,17 @@
//go:build darwin && sdl && !rgfw
// +build darwin,sdl,!rgfw
//go:build darwin && (sdl || sdl3) && !rgfw
// +build darwin
// +build sdl sdl3
// +build !rgfw
package rl
/*
#cgo darwin LDFLAGS: -framework Cocoa -framework IOKit -framework CoreVideo -framework CoreFoundation
#cgo darwin CFLAGS: -Wno-deprecated-declarations -Wno-implicit-const-int-float-conversion -DPLATFORM_DESKTOP_SDL
#cgo darwin pkg-config: sdl2
#cgo darwin CFLAGS: -Wno-deprecated-declarations -Wno-implicit-const-int-float-conversion
#cgo darwin,sdl CFLAGS: -DPLATFORM_DESKTOP_SDL
#cgo darwin,sdl3 CFLAGS: -DPLATFORM_DESKTOP_SDL -DPLATFORM_DESKTOP_SDL3
#cgo darwin,sdl pkg-config: sdl2
#cgo darwin,sdl3 pkg-config: sdl3
#cgo darwin,!es2,!es3 LDFLAGS: -framework OpenGL