mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Simplify the SCons build:
On OS X, build all code as Objective-C(++). Centralize framework handling. Cleanup. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5645 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -25,8 +25,6 @@ files = [
|
||||
'PostProcessing.cpp',
|
||||
'FramebufferManager.cpp',
|
||||
]
|
||||
compileFlags = [
|
||||
]
|
||||
linkFlags = [
|
||||
]
|
||||
libs = [
|
||||
@ -50,45 +48,10 @@ if gfxenv['HAVE_WX']:
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
files += [ 'cocoaGL.m' ]
|
||||
compileFlags += [
|
||||
'-x',
|
||||
'objective-c++',
|
||||
]
|
||||
|
||||
if sys.platform == 'win32':
|
||||
files += [ 'OS/Win32.cpp' ]
|
||||
|
||||
tests = {'CheckPKG' : utils.CheckPKG}
|
||||
conf = gfxenv.Configure(custom_tests = tests,
|
||||
config_h=env['base_dir']+"Source/Core/Common/Src/Config.h")
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
gfxenv['FRAMEWORKS'] = ['CoreFoundation', 'System', 'OpenGL', 'Cocoa', 'Cg']
|
||||
if gfxenv['HAVE_OPENCL']:
|
||||
gfxenv['FRAMEWORKS'] += ['OpenCL']
|
||||
|
||||
conf.CheckPKG('OpenGL')
|
||||
if not conf.CheckPKG('Cg'):
|
||||
print name + " must have Cg framework from nvidia to be build"
|
||||
Return()
|
||||
|
||||
elif sys.platform == 'win32':
|
||||
print name + " is assuming that you have opengl, glu, cg, and cggl"
|
||||
else:
|
||||
if not (conf.CheckPKG('GL') and conf.CheckPKG('GLU')):
|
||||
print name + " must have opengl and glu to be build"
|
||||
Return()
|
||||
|
||||
if not conf.CheckPKG('Cg') or not conf.CheckPKG('CgGL'):
|
||||
print name + " must have cg and cggl to be build"
|
||||
Return()
|
||||
if sys.platform == 'win32':
|
||||
print name + " is assuming that you have glew"
|
||||
else:
|
||||
if not conf.CheckPKG('GLEW'):
|
||||
print name + " must have glew to be build"
|
||||
Return()
|
||||
|
||||
|
||||
if sys.platform == 'win32':
|
||||
files += [
|
||||
'OS/Win32.cpp'
|
||||
@ -98,16 +61,10 @@ if sys.platform == 'win32':
|
||||
]
|
||||
gfxenv['CPPPATH'] += libs
|
||||
|
||||
conf.Finish()
|
||||
|
||||
# Sanity check
|
||||
if gfxenv['USE_WX'] and not gfxenv['HAVE_WX']:
|
||||
print "Must have wx to use wxgl"
|
||||
Return()
|
||||
gfxenv.Append(
|
||||
CXXFLAGS = compileFlags,
|
||||
LINKFLAGS = linkFlags,
|
||||
)
|
||||
|
||||
gfxenv.SharedLibrary(
|
||||
env['plugin_dir']+name,
|
||||
|
Reference in New Issue
Block a user