* Take more link dependencies caused by OSD out of genie.lua

* Always dynamically link SDL on Windows
* Fix SDL1 build on Windows
This commit is contained in:
Vas Crabb 2015-04-04 18:25:04 +11:00
parent 3a15dfc2d8
commit 73f53bb15e
6 changed files with 49 additions and 37 deletions

View File

@ -53,7 +53,7 @@ newoption {
newoption {
trigger = "osd",
description = "Choose target OSD",
description = "Choose OSD layer implementation",
}
newoption {
@ -781,26 +781,12 @@ configuration { "mingw*" }
"-static-libgcc",
"-static-libstdc++",
}
if _OPTIONS["osd"]=="sdl" then
links {
"SDL2",
"imm32",
"version",
"ole32",
"oleaut32",
}
end
links {
"user32",
"gdi32",
"dsound",
"dxguid",
"winmm",
"advapi32",
"comctl32",
"shlwapi",
"wsock32",
"comdlg32",
}
configuration { "vs*" }
@ -813,15 +799,10 @@ configuration { "vs*" }
}
links {
"user32",
"gdi32",
"dsound",
"dxguid",
"winmm",
"advapi32",
"comctl32",
"shlwapi",
"wsock32",
"comdlg32",
}
buildoptions {

View File

@ -181,6 +181,14 @@ function osdmodulestargetconf()
end
end
if _OPTIONS["targetos"]=="windows" then
links {
"gdi32",
"dsound",
"dxguid",
}
end
end

View File

@ -43,6 +43,16 @@ function maintargetosdoptions(_target)
end
if _OPTIONS["targetos"]=="windows" then
if _OPTIONS["SDL_LIBVER"]=="sdl2" then
links {
"SDL2.dll",
}
else
links {
"SDL.dll",
}
end
configuration { "mingw*" }
linkoptions{
"-municode",
@ -59,10 +69,6 @@ function maintargetosdoptions(_target)
libdirs {
path.join(_OPTIONS["SDL_INSTALL_ROOT"],"lib","x64")
}
configuration { "vs*" }
links {
"SDL2",
}
configuration {}
elseif _OPTIONS["targetos"]=="haiku" then
links {
@ -282,13 +288,6 @@ elseif BASE_TARGETOS=="os2" then
}
end
configuration { "mingw*" }
linkoptions {
"-static"
}
configuration { }
project ("osd_" .. _OPTIONS["osd"])
uuid (os.uuid("osd_" .. _OPTIONS["osd"]))
@ -442,6 +441,15 @@ if _OPTIONS["with-tools"] then
}
if _OPTIONS["targetos"]=="windows" then
if _OPTIONS["SDL_LIBVER"]=="sdl2" then
links {
"SDL2.dll",
}
else
links {
"SDL.dll",
}
end
linkoptions{
"-municode",
}

View File

@ -28,6 +28,11 @@ function maintargetosdoptions(_target)
}
end
links {
"comctl32",
"comdlg32",
}
local rcfile = MAME_DIR .. "src/" .. _target .. "/osd/windows/" .. _target ..".rc"
if os.isfile(rcfile) then

View File

@ -12,6 +12,11 @@
#ifndef __SDLVIDEO__
#define __SDLVIDEO__
#if defined(SDLMAME_WIN32) && !(SDLMAME_SDL2)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#include "osdsdl.h"
//============================================================

View File

@ -9,6 +9,11 @@
//
//============================================================
#ifdef SDLMAME_WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
// standard SDL headers
#include "sdlinc.h"
@ -60,16 +65,16 @@
// minimum window dimension
#define MIN_WINDOW_DIM 200
//#ifndef SDLMAME_WIN32
#define WMSZ_TOP (0)
#define WMSZ_BOTTOM (1)
#ifndef SDLMAME_WIN32
#define WMSZ_TOP (0)
#define WMSZ_BOTTOM (1)
#define WMSZ_BOTTOMLEFT (2)
#define WMSZ_BOTTOMRIGHT (3)
#define WMSZ_LEFT (4)
#define WMSZ_LEFT (4)
#define WMSZ_TOPLEFT (5)
#define WMSZ_TOPRIGHT (6)
#define WMSZ_RIGHT (7)
//#endif
#define WMSZ_RIGHT (7)
#endif
//============================================================
// GLOBAL VARIABLES