summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-02-22 14:23:15 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-02-22 14:23:15 +0100
commitcce0696a5fbb2be1c24ca1637640b9c791178416 (patch)
tree42506383e1b576ba7882a2dfc731cd9dcec3d65d /scripts/src
parent900fac767dcd4a69e70ccf066e261177d61c91f8 (diff)
Made OSD=sdl build compile out of box in Visual Studio (nw)
Diffstat (limited to 'scripts/src')
-rw-r--r--scripts/src/main.lua8
-rw-r--r--scripts/src/osd/sdl.lua41
-rw-r--r--scripts/src/osd/sdl_cfg.lua2
3 files changed, 43 insertions, 8 deletions
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 80ebe436e01..b8125bf1989 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -284,8 +284,14 @@ end
"@echo Emitting ".. rctarget .. "vers.rc...",
PYTHON .. " " .. path.translate(MAME_DIR .. "scripts/build/verinfo.py","\\") .. " -r -b " .. rctarget .. " " .. path.translate(MAME_DIR .. "src/version.cpp","\\") .. " > " .. path.translate(GEN_DIR .. "resource/" .. rctarget .. "vers.rc", "\\") ,
}
+
+ if (_OPTIONS["osd"] == "sdl") then
+ configuration { "x64","vs*" }
+ prelinkcommands { "copy " .. path.translate(MAME_DIR .."3rdparty/sdl2/lib/x64/SDL2.dll", "\\") .. " " .. path.translate(MAME_DIR .."SDL2.dll","\\") .. " /Y" }
+ configuration { "x32","vs*" }
+ prelinkcommands { "copy " .. path.translate(MAME_DIR .."3rdparty/sdl2/lib/x86/SDL2.dll", "\\") .. " " .. path.translate(MAME_DIR .."SDL2.dll","\\") .. " /Y" }
+ end
-
configuration { }
debugdir (MAME_DIR)
diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua
index cb5bd6debdc..76947ad777a 100644
--- a/scripts/src/osd/sdl.lua
+++ b/scripts/src/osd/sdl.lua
@@ -49,9 +49,24 @@ function maintargetosdoptions(_target,_subtarget)
if _OPTIONS["targetos"]=="windows" then
if _OPTIONS["USE_LIBSDL"]~="1" then
- links {
- "SDL2.dll",
- }
+ configuration { "mingw*"}
+ links {
+ "SDL2.dll",
+ }
+ configuration { "x64","vs*" }
+ libdirs {
+ MAME_DIR .. "3rdparty/sdl2/lib/x64",
+ }
+ configuration { "x32","vs*" }
+ libdirs {
+ MAME_DIR .. "3rdparty/sdl2/lib/x86",
+ }
+
+ configuration { "vs*"}
+ links {
+ "SDL2",
+ }
+ configuration { }
else
local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
addlibfromstring(str)
@@ -488,9 +503,23 @@ if _OPTIONS["with-tools"] then
if _OPTIONS["targetos"] == "windows" then
if _OPTIONS["USE_LIBSDL"]~="1" then
- links {
- "SDL2.dll",
- }
+ configuration { "mingw*"}
+ links {
+ "SDL2.dll",
+ }
+ configuration { "x64","vs*" }
+ libdirs {
+ MAME_DIR .. "3rdparty/sdl2/lib/x64",
+ }
+ configuration { "x32","vs*" }
+ libdirs {
+ MAME_DIR .. "3rdparty/sdl2/lib/x86",
+ }
+ configuration { "vs*"}
+ links {
+ "SDL2",
+ }
+ configuration { }
else
local str = backtick(sdlconfigcmd() .. " --libs | sed 's/ -lSDLmain//'")
addlibfromstring(str)
diff --git a/scripts/src/osd/sdl_cfg.lua b/scripts/src/osd/sdl_cfg.lua
index bdeb7274ef1..e3a6f913e75 100644
--- a/scripts/src/osd/sdl_cfg.lua
+++ b/scripts/src/osd/sdl_cfg.lua
@@ -113,7 +113,7 @@ if _OPTIONS["targetos"]=="windows" then
}
configuration { "vs*" }
includedirs {
- path.join(_OPTIONS["SDL_INSTALL_ROOT"],"include")
+ MAME_DIR .. "3rdparty/sdl2/include",
}
configuration { }