summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Src/SConscript
blob: c352f14f64a2e9a4d645e53322af9115f9b6dd75 (plain)
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
99
100
101
102
103
104
105
106
# -*- python -*-

Import('env')
import os
import sys

wxenv = env.Clone()

files = [
	'BootManager.cpp',
	'cmdline.c',
	]

libs = [
	'core', 'lzo2', 'discio', 'bdisasm', 'videocommon', 
	'inputcommon', 'common', 'lua', 'z', 'sfml-network'
	]

if wxenv['HAVE_WX']:
	files += [
		'AboutDolphin.cpp',
		'ARCodeAddEdit.cpp',
		'ConfigMain.cpp',
		'Frame.cpp',
		'FrameAui.cpp',
		'FrameTools.cpp',
		'LuaWindow.cpp',
		'LogWindow.cpp',
		'GameListCtrl.cpp',
		'Globals.cpp',
		'HotkeyDlg.cpp',
		'ISOFile.cpp',
		'ISOProperties.cpp',
		'MemcardManager.cpp',
		'MemoryCards/GCMemcard.cpp',
		'PatchAddEdit.cpp',
		'CheatsWindow.cpp',
		'stdafx.cpp',
		'WxUtils.cpp',
		'MemoryCards/WiiSaveCrypted.cpp',
		'NetPlay.cpp',
		'NetPlayClient.cpp',
		'NetPlayServer.cpp',
		'NetWindow.cpp',
		]

        CPPDEFINE = [
                'wxNEEDS_CHARPP',
                ],

	compileFlags = [
		],


	libs = [ 'debwx', 'debugger_ui_util'] + libs


if sys.platform == 'darwin':
	files += [ 'cocoaApp.m', ]

	compileFlags = [
		'-x',
		'objective-c++',
		]

	linkflags = [
		'-pthread', '-framework', 'IOKit'
		]

	exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
	exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'

	wxenv['FRAMEWORKS'] = ['Cocoa', 'CoreFoundation', 'System']
	wxenv.Plist(
		env['binary_dir'] + 'Dolphin.app/Contents/Info.plist',
		Value(dict(
			CFBundleExecutable = 'Dolphin',
			CFBundleIconFile = 'Dolphin.icns',
			CFBundleIdentifier = 'com.dolphin-emu.dolphin',
			CFBundleName = 'Dolphin',
			CFBundlePackageType = 'APPL',
			CFBundleShortVersionString =
				os.popen('svnversion -n ' + Dir('#').abspath).read(),
			CFBundleVersion = '2.0',
			LSRequiresCarbon = True,
			))
		)
else:
	exeGUI = env['binary_dir'] + 'dolphin-emu'
	exeNoGUI = env['binary_dir'] + 'dolphin-emu-nogui'
	linkflags = [ '-pthread' ]

if wxenv['HAVE_X11']:
	files += [ 'X11Utils.cpp' ]


wxenv.Append(
	CXXFLAGS = compileFlags,
	LINKFLAGS = linkflags,
	LIBS = libs,
)

if wxenv['HAVE_WX']:
	wxenv.Program(exeGUI, files + [ 'Main.cpp' ])
else:
	wxenv.Program(exeNoGUI, files + [ 'MainNoGUI.cpp' ])