Linux build fix, code cleanup, and compiler warning removal.
[dolphin.git] / Source / Core / DolphinWX / Src / SConscript
blobc34feaf2a132bd7a736134d916506d9f82e13cc8
1 # -*- python -*-
3 Import('env')
4 import os
5 import sys
7 wxenv = env.Clone()
9 files = [
10         'BootManager.cpp',
11         ]
13 libs = [
14         'core', 'lzo2', 'discio', 'bdisasm', 'videocommon',
15         'inputuicommon', 'inputcommon', 'common', 'lua', 'z', 'sfml-network',
16         'SDL'
17         ]
19 if wxenv['HAVE_WX']:
20         memcardfiles = [
21                 'MemcardManager.cpp',
22                 'MemoryCards/GCMemcard.cpp',
23                 'WxUtils.cpp',
24         ]
26         files += memcardfiles
27         files += [
28                 'AboutDolphin.cpp',
29                 'ARCodeAddEdit.cpp',
30                 'ConfigMain.cpp',
31                 'Frame.cpp',
32                 'FrameAui.cpp',
33                 'FrameTools.cpp',
34                 'LuaWindow.cpp',
35                 'LogWindow.cpp',
36                 'GameListCtrl.cpp',
37                 'Globals.cpp',
38                 'HotkeyDlg.cpp',
39                 'ISOFile.cpp',
40                 'ISOProperties.cpp',
41                 'PatchAddEdit.cpp',
42                 'CheatsWindow.cpp',
43                 'MemoryCards/WiiSaveCrypted.cpp',
44                 'NetPlay.cpp',
45                 'NetPlayClient.cpp',
46                 'NetPlayServer.cpp',
47                 'NetWindow.cpp',
48                 ]
50         CPPDEFINES = [
51                 'wxNEEDS_CHARPP',
52                 ],
54         libs = [ 'debwx', 'debugger_ui_util'] + libs
55 else:
56         files+= [
57                 'cmdline.c',
58                 ]
60 if sys.platform == 'win32':
61         files += [ "stdafx.cpp" ]
62 elif sys.platform == 'darwin':
63         files += [ 'cocoaApp.m' ]
65         exeGUI = env['binary_dir'] + 'Dolphin.app/Contents/MacOS/Dolphin'
66         exeNoGUI = env['binary_dir'] + 'DolphinNoGUI'
68         env.Install(env['binary_dir'] + 'Dolphin.app/Contents/' +
69                 'Library/Frameworks/Cg.framework',
70                 '/Library/Frameworks/Cg.framework/Cg')
72         wxenv.Plist(
73                 env['binary_dir'] + 'Dolphin.app/Contents/Info.plist',
74                 Value(dict(
75                         CFBundleExecutable = 'Dolphin',
76                         CFBundleIconFile = 'Dolphin.icns',
77                         CFBundleIdentifier = 'com.dolphin-emu.dolphin',
78                         CFBundlePackageType = 'APPL',
79                         CFBundleShortVersionString =
80                         os.popen('svnversion -n ' + Dir('#').abspath).read(),
81                         CFBundleVersion = '2.0',
82                         LSMinimumSystemVersion = '10.5.0',
83                         LSRequiresCarbon = True,
84                         ))
85                 )
86 else:
87         files += [ 'X11Utils.cpp' ]
88         exeGUI = env['binary_dir'] + 'dolphin-emu'
89         exeNoGUI = env['binary_dir'] + 'dolphin-emu-nogui'
91 wxenv.Append(
92         LIBS = libs
93         )
95 if wxenv['HAVE_WX']:
96         wxenv.Program(exeGUI, files + [ 'Main.cpp' ])
97         wxenv.StaticLibrary(env['local_libs'] + 'memcard', memcardfiles)
98 else:
99         wxenv.Program(exeNoGUI, files + [ 'MainNoGUI.cpp' ])