summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/osd_cfg.lua
blob: ff58ddaaaaff7e1cadcf1ee00ce48b8803f8b96f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
if _OPTIONS["osd"]=="windows" then
	defines {
		"UNICODE",
		"_UNICODE",
		"X64_WINDOWS_ABI",
		"OSD_WINDOWS",
		"USE_SDL=0",
		"USE_QTDEBUG=0",
		"USE_OPENGL=1",
		"USE_DISPATCH_GL=1",
		"DIRECTINPUT_VERSION=0x0800"
	}
	--forcedincludes {
	--	MAME_DIR .. "src/osd/windows/winprefix.h"
	--}
elseif _OPTIONS["osd"]=="sdl" then
	--forcedincludes {
	--	MAME_DIR .. "src/osd/sdl/sdlprefix.h"
	--}
	if _OPTIONS["targetos"]=="windows" then
		defines {
			"OSD_SDL",
			"SDLMAME_WIN32",
			"X64_WINDOWS_ABI",
			"UNICODE",
			"_UNICODE",
			"SDLMAME_SDL2=1",
			"USE_XINPUT=0",
			"USE_OPENGL=1",
			"USE_QTDEBUG=1",
		}
		buildoptions {
			"-I$(shell qmake -query QT_INSTALL_HEADERS)/QtCore",
			"-I$(shell qmake -query QT_INSTALL_HEADERS)/QtGui",
			"-I$(shell qmake -query QT_INSTALL_HEADERS)",
		}
		
		linkoptions{
			"-L$(shell qmake -query QT_INSTALL_LIBS)",
		}
			
		links {
			"qtmain",
			"QtGui4",
			"QtCore4",
		}
	end
	if _OPTIONS["targetos"]=="linux" then
		defines {
			"OSD_SDL",
			"SDLMAME_UNIX",
			"SDLMAME_SDL2=1",
			"USE_XINPUT=0",
			"USE_OPENGL=1",
			"USE_QTDEBUG=1",
		}
		if (USE_BGFX == 1) then
			defines {
				"USE_BGFX"
			}
		end
		buildoptions {
			'$(shell pkg-config --cflags QtGui)',
		}
		links {
			'QtGui',
			'QtCore',
		}
		--linkoptions {
		--	'$(shell pkg-config --libs QtGui)',
		--}
	end
	if _OPTIONS["targetos"]=="macosx" then
		defines {
			"OSD_SDL",
			"SDLMAME_UNIX",
			"SDLMAME_MACOSX",
			"SDLMAME_DARWIN",
			"SDLMAME_SDL2=1",
			"USE_XINPUT=0",
			"USE_OPENGL=1",
			"USE_QTDEBUG=0",
		}
		if (USE_BGFX == 1) then
			defines {
				"USE_BGFX"
			}
		end
	end
elseif _OPTIONS["osd"]=="osdmini" then
	defines {
		"OSD_MINI",
		"USE_QTDEBUG",
		"USE_SDL",
		"SDLMAME_NOASM=1",
		"USE_OPENGL=0",
	}
end