summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/osd/sdl.lua
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2015-04-01 00:04:03 +1100
committer Vas Crabb <vas@vastheman.com>2015-04-01 01:21:59 +1100
commit9a2c6d95c80b849e70fd3428d5e7c672fe2b607e (patch)
tree1cdeae695de08ba11eccef21c9cc2bddc205c0a6 /scripts/src/osd/sdl.lua
parentecbdb7dd1dcc7364f245d4ff4af976ed0a617a39 (diff)
Restore NO_USE_MIDI and some more OS support from the old SDL makefile
Diffstat (limited to 'scripts/src/osd/sdl.lua')
-rw-r--r--scripts/src/osd/sdl.lua48
1 files changed, 44 insertions, 4 deletions
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index 8aa7f387937..93de0e87dfd 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -59,16 +59,32 @@ function maintargetosdoptions(_target)
}
end
elseif _OPTIONS["targetos"]=="linux" then
- if (USE_QT == 1) then
+ if USE_QT == 1 then
+ linkoptions {
+ "$(shell pkg-config --libs QtGui)",
+ }
links {
"QtGui",
"QtCore",
}
-
+ end
+ if _OPTIONS["NO_USE_MIDI"]~="1" then
linkoptions {
- "$(shell pkg-config --libs QtGui)",
+ string.gsub(os.outputof("pkg-config --libs alsa"), '[\r\n]+', ' '),
+ }
+ end
+ elseif _OPTIONS["targetos"]=="macosx" then
+ if _OPTIONS["NO_USE_MIDI"]~="1" then
+ links {
+ "CoreAudio.framework",
+ "CoreMIDI.framework",
}
end
+ elseif _OPTIONS["targetos"]=="haiku" then
+ links {
+ "network",
+ "bsd",
+ }
end
configuration { "mingw*" or "vs*" }
@@ -82,7 +98,7 @@ function sdlconfigcmd()
if not _OPTIONS["SDL_INSTALL_ROOT"] then
return _OPTIONS["SDL_LIBVER"] .. "-config"
else
- return _OPTIONS["SDL_INSTALL_ROOT"] .. "/bin/" .. _OPTIONS["SDL_LIBVER"] .. "-config"
+ return path.join(_OPTIONS["SDL_INSTALL_ROOT"],"bin",_OPTIONS["SDL_LIBVER"]) .. "-config"
end
end
@@ -118,6 +134,23 @@ if not _OPTIONS["NO_USE_XINPUT"] then
end
newoption {
+ trigger = "NO_USE_MIDI",
+ description = "Disable MIDI I/O",
+ allowed = {
+ { "0", "Enable MIDI" },
+ { "1", "Disable MIDI" },
+ },
+}
+
+if not _OPTIONS["NO_USE_MIDI"] then
+ if _OPTIONS["targetos"]=="freebsd" or _OPTIONS["targetos"]=="openbsd" or _OPTIONS["targetos"]=="netbsd" or _OPTIONS["targetos"]=="solaris" or _OPTIONS["targetos"]=="haiku" or _OPTIONS["targetos"] == "emscripten" or _OPTIONS["targetos"] == "os2" then
+ _OPTIONS["NO_USE_MIDI"] = "1"
+ else
+ _OPTIONS["NO_USE_MIDI"] = "0"
+ end
+end
+
+newoption {
trigger = "SDL_LIBVER",
description = "Choose SDL version",
allowed = {
@@ -244,6 +277,13 @@ if BASE_TARGETOS=="unix" then
end
end
end
+elseif BASE_TARGETOS=="os2" then
+ linkoptions {
+ string.gsub(os.outputof(sdlconfigcmd() .. " --libs"), '[\r\n]+', ' '),
+ }
+ links {
+ "pthread"
+ }
end
configuration { "mingw*" }