Use frameworks for SDL if requested and available
This commit is contained in:
@@ -66,6 +66,15 @@ case "$HOST_SYSTEM" in
|
|||||||
LIB_SDL_VERSION='1.2.13'
|
LIB_SDL_VERSION='1.2.13'
|
||||||
LIB_SDL_DETECT="true"
|
LIB_SDL_DETECT="true"
|
||||||
;;
|
;;
|
||||||
|
Darwin)
|
||||||
|
if not have_framework SDL; then
|
||||||
|
LIB_SDL_DETECT="have_command sdl-config"
|
||||||
|
LIB_SDL_CFLAGS='$(sdl-config --cflags)'
|
||||||
|
LIB_SDL_LDFLAGS='$(sdl-config --libs)'
|
||||||
|
LIB_SDL_VERSION='$(sdl-config --version)'
|
||||||
|
fi
|
||||||
|
LIB_SDL_LDFLAGS="$LIB_SDL_LDFLAGS -lobjc -framework Cocoa"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
LIB_SDL_DETECT="have_command sdl-config"
|
LIB_SDL_DETECT="have_command sdl-config"
|
||||||
LIB_SDL_CFLAGS='$(sdl-config --cflags)'
|
LIB_SDL_CFLAGS='$(sdl-config --cflags)'
|
||||||
@@ -82,10 +91,13 @@ case "$HOST_SYSTEM" in
|
|||||||
LIB_SDL2_DETECT="false"
|
LIB_SDL2_DETECT="false"
|
||||||
;;
|
;;
|
||||||
Darwin)
|
Darwin)
|
||||||
LIB_SDL2_DETECT="have_command sdl2-config"
|
if not have_framework SDL2; then
|
||||||
LIB_SDL2_CFLAGS='$(sdl2-config --cflags)'
|
LIB_SDL2_DETECT="have_command sdl2-config"
|
||||||
LIB_SDL2_LDFLAGS='$(sdl2-config --static-libs)'
|
LIB_SDL2_CFLAGS='$(sdl2-config --cflags)'
|
||||||
LIB_SDL2_VERSION='$(sdl2-config --version)'
|
LIB_SDL2_LDFLAGS='$(sdl2-config --libs)'
|
||||||
|
LIB_SDL2_VERSION='$(sdl2-config --version)'
|
||||||
|
fi
|
||||||
|
LIB_SDL2_LDFLAGS="$LIB_SDL2_LDFLAGS -lobjc -framework Cocoa"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
LIB_SDL2_DETECT="have_command sdl2-config"
|
LIB_SDL2_DETECT="have_command sdl2-config"
|
||||||
|
|||||||
Reference in New Issue
Block a user