summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/osd/sdl.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/src/osd/sdl.lua')
-rw-r--r--scripts/src/osd/sdl.lua108
1 files changed, 28 insertions, 80 deletions
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index 3aa046b8ab1..abf4a90fd97 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -54,14 +54,11 @@ function maintargetosdoptions(_target,_subtarget)
end
if _OPTIONS["targetos"]=="windows" then
- if _OPTIONS["with-bundled-sdl2"]~=nil then
+ if _OPTIONS["USE_LIBSDL"]~="1" then
configuration { "mingw*"}
links {
+ "SDL2main",
"SDL2",
- "imm32",
- "version",
- "ole32",
- "oleaut32",
}
configuration { "vs*" }
links {
@@ -71,34 +68,20 @@ function maintargetosdoptions(_target,_subtarget)
}
configuration { }
else
- if _OPTIONS["USE_LIBSDL"]~="1" then
- configuration { "mingw*"}
- links {
- "SDL2main",
- "SDL2",
- }
- configuration { "vs*" }
- links {
- "SDL2",
- "imm32",
- "version",
- }
- configuration { }
- else
- local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
- addlibfromstring(str)
- addoptionsfromstring(str)
- end
- configuration { "x32", "vs*" }
- libdirs {
- path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x86")
- }
- configuration { "x64", "vs*" }
- libdirs {
- path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64")
- }
- configuration { }
+ local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
end
+ configuration { "x32", "vs*" }
+ libdirs {
+ path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x86")
+ }
+ configuration { "x64", "vs*" }
+ libdirs {
+ path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64")
+ }
+ configuration { }
+
links {
"dinput8",
"psapi",
@@ -117,15 +100,6 @@ function maintargetosdoptions(_target,_subtarget)
"ole32",
}
configuration { }
-
- if _OPTIONS["targetos"]=="macosx" then
- if _OPTIONS["with-bundled-sdl2"]~=nil then
- links {
- "SDL2",
- }
- end
- end
-
end
@@ -160,7 +134,7 @@ newoption {
}
if not _OPTIONS["NO_X11"] then
- if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" then
+ if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" or _OPTIONS["targetos"]=="android" then
_OPTIONS["NO_X11"] = "1"
else
_OPTIONS["NO_X11"] = "0"
@@ -177,7 +151,7 @@ newoption {
}
if not _OPTIONS["NO_USE_XINPUT"] then
- if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" then
+ if _OPTIONS["targetos"]=="windows" or _OPTIONS["targetos"]=="macosx" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"]=="asmjs" or _OPTIONS["targetos"]=="android" then
_OPTIONS["NO_USE_XINPUT"] = "1"
else
_OPTIONS["NO_USE_XINPUT"] = "0"
@@ -252,11 +226,6 @@ elseif _OPTIONS["targetos"]=="macosx" then
SDLOS_TARGETOS = "macosx"
end
-if _OPTIONS["with-bundled-sdl2"]~=nil then
- includedirs {
- GEN_DIR .. "includes",
- }
-end
if BASE_TARGETOS=="unix" then
if _OPTIONS["targetos"]=="macosx" then
local os_version = str_to_version(backtick("sw_vers -productVersion"))
@@ -276,29 +245,17 @@ if BASE_TARGETOS=="unix" then
"-weak_framework Metal",
}
end
- if _OPTIONS["with-bundled-sdl2"]~=nil then
+ if _OPTIONS["USE_LIBSDL"]~="1" then
linkoptions {
- "-framework AudioToolbox",
- "-framework AudioUnit",
- "-framework CoreAudio",
- "-framework Carbon",
- "-framework ForceFeedback",
- "-framework IOKit",
- "-framework CoreVideo",
+ "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
+ }
+ links {
+ "SDL2.framework",
}
else
- if _OPTIONS["USE_LIBSDL"]~="1" then
- linkoptions {
- "-F" .. _OPTIONS["SDL_FRAMEWORK_PATH"],
- }
- links {
- "SDL2.framework",
- }
- else
- local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'")
- addlibfromstring(str)
- addoptionsfromstring(str)
- end
+ local str = backtick(sdlconfigcmd() .. " --libs --static | sed 's/-lSDLmain//'")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
end
else
if _OPTIONS["NO_X11"]=="1" then
@@ -310,17 +267,9 @@ if BASE_TARGETOS=="unix" then
"/usr/openwin/lib",
}
end
- if _OPTIONS["with-bundled-sdl2"]~=nil then
- if _OPTIONS["targetos"]~="android" then
- links {
- "SDL2",
- }
- end
- else
- local str = backtick(sdlconfigcmd() .. " --libs")
- addlibfromstring(str)
- addoptionsfromstring(str)
- end
+ local str = backtick(sdlconfigcmd() .. " --libs")
+ addlibfromstring(str)
+ addoptionsfromstring(str)
if _OPTIONS["targetos"]~="haiku" and _OPTIONS["targetos"]~="android" then
links {
@@ -441,7 +390,6 @@ project ("osd_" .. _OPTIONS["osd"])
MAME_DIR .. "src/osd/sdl/window.h",
}
-
project ("ocore_" .. _OPTIONS["osd"])
targetsubdir(_OPTIONS["target"] .."_" .. _OPTIONS["subtarget"])
uuid (os.uuid("ocore_" .. _OPTIONS["osd"]))