dolphin/Source/Core/DolphinWX/Src/SConscript
Soren Jorvang 52d3137598 Build with -msse3 on OS X. The first Intel Macs were Core Duo/Solo, which
had SSE3. Keep -msse2 on other platforms. Not sure if there are actually
any Dolphin-capable machines out there without SSE3, but..

Use -search_paths_first to give our statically linked libraries precedence
over /usr/local/lib. 

Some work-in-progress changes to facilitate a more easily redistributable
application bundle on OS X.

Group compiler/preprocessor/linker flags together to make the full set
more intuitively apparent.

The various libraries in Externals have rather inconsistent conventions
for include paths. Best to encapsulate that knowledge in foo/SConscript.

Re-use utils.GenerateRevFile for all three places in the build system 
where we need the SVN revision number.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6030 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-01 16:30:22 +00:00

111 lines
2.8 KiB
Python

# -*- python -*-
Import('env')
import os
import sys
from SconsTests import utils
files = [
'BootManager.cpp',
]
libs = [
'core', 'lzo2', 'discio', 'bdisasm',
'inputcommon', 'common', 'lua', 'z', 'sfml-network',
]
if env['HAVE_WX']:
memcardfiles = [
'MemcardManager.cpp',
'MemoryCards/GCMemcard.cpp',
'WxUtils.cpp',
]
files += [
'AboutDolphin.cpp',
'ARCodeAddEdit.cpp',
'GeckoCodeDiag.cpp',
'ConfigMain.cpp',
'Frame.cpp',
'FrameAui.cpp',
'FrameTools.cpp',
'LuaWindow.cpp',
'LogWindow.cpp',
'GameListCtrl.cpp',
'HotkeyDlg.cpp',
'ISOFile.cpp',
'ISOProperties.cpp',
'PatchAddEdit.cpp',
'CheatsWindow.cpp',
'Main.cpp',
'MemoryCards/WiiSaveCrypted.cpp',
'NetPlay.cpp',
'NetPlayClient.cpp',
'NetPlayServer.cpp',
'NetWindow.cpp',
]
wxlibs = [ 'debwx', 'debugger_ui_util', 'inputuicommon', 'memcard' ]
else:
files+= [
'MainNoGUI.cpp',
'cmdline.c',
]
if sys.platform == 'win32':
files += [ "stdafx.cpp" ]
elif sys.platform == 'darwin' and not env['HAVE_WX']:
files += [ 'cocoaApp.m' ]
exeNoGUI = '#' + env['prefix'] + '/DolphinNoGUI'
elif sys.platform == 'darwin' and env['HAVE_WX']:
exeGUI = 'Dolphin'
exeGUIdist = '#' + env['prefix'] + '/Dolphin.app/Contents/MacOS/Dolphin'
env.Install('#' + env['prefix'] + '/Dolphin.app/Contents/' +
'Library/Frameworks/Cg.framework',
'#Externals/Cg/Cg.framework/Cg')
env.Install(env['data_dir'], '#Data/Sys')
env.Install(env['data_dir'], '#Data/User')
env.Install(env['data_dir'],
'#Source/Core/DolphinWX/resources/Dolphin.icns')
from plistlib import writePlist
def createPlist(target, source, env):
for srcNode in source:
writePlist(srcNode.value, str(target[0]))
env.Append(BUILDERS = {'Plist' : Builder(action = createPlist)})
env.Plist('#' + env['prefix'] + '/Dolphin.app/Contents/Info.plist',
Value(dict(
CFBundleExecutable = 'Dolphin',
CFBundleIconFile = 'Dolphin.icns',
CFBundleIdentifier = 'com.dolphin-emu.dolphin',
CFBundlePackageType = 'APPL',
CFBundleShortVersionString =
utils.GenerateRevFile('', Dir('#None').abspath, None),
CFBundleVersion = '2.0',
LSMinimumSystemVersion = '10.5.0',
LSRequiresCarbon = True,
)))
def Fixup(target, source, env):
if env['CPPDEFINES'].count('WXUSINGDLL'):
pass
os.link(str(source[0]), str(target[0]))
env.Append(BUILDERS = {'Fixup' : Builder(action = Fixup)})
env.Depends(exeGUIdist, env['plugin_dir'])
env.Fixup(exeGUIdist, exeGUI)
else:
files += [ 'X11Utils.cpp' ]
libs += [ 'SDL' ]
exeGUI = env['binary_dir'] + '/dolphin-emu'
exeNoGUI = env['binary_dir'] + '/dolphin-emu-nogui'
env.InstallAs(env['data_dir'] + '/sys', '#Data/Sys')
env.InstallAs(env['data_dir'] + '/user', '#Data/User')
if env['HAVE_WX']:
env.StaticLibrary(env['local_libs'] + 'memcard', memcardfiles)
env.Program(exeGUI, files, LIBS = env['LIBS'] + wxlibs + libs)
else:
env.Program(exeNoGUI, files, LIBS = env['LIBS'] + libs)