Soren Jorvang 3ab27a7d87 Revert parts of r5576 and r5598 for Sonicadvance1's sake.
This reenables the option for building without wx on OS X,
but still leaves wxgl as the default.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5599 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-04 04:59:07 +00:00

102 lines
2.1 KiB
Python

# -*- python -*-
Import('env')
# can we import path in one place?
import sys
sys.path.append(env['base_dir']+'SconsTests')
import utils
import platform
name = "Plugin_VideoSoftware"
files = [
'BPMemLoader.cpp',
'Clipper.cpp',
'CommandProcessor.cpp',
'CPMemLoader.cpp',
'DebugUtil.cpp',
'EfbCopy.cpp',
'EfbInterface.cpp',
'GLUtil.cpp',
'HwRasterizer.cpp',
'main.cpp',
'OpcodeDecoder.cpp',
'PixelEngine.cpp',
'Rasterizer.cpp',
'RasterFont.cpp',
'Renderer.cpp',
'SetupUnit.cpp',
'Statistics.cpp',
'Tev.cpp',
'TextureEncoder.cpp',
'TextureSampler.cpp',
'TransformUnit.cpp',
'VertexFormatConverter.cpp',
'VertexLoader.cpp',
'VideoConfig.cpp',
'XFMemLoader.cpp',
]
linkFlags = [
]
libs = [
'videocommon', 'SOIL', 'common'
]
gfxenv = env.Clone()
if sys.platform == 'win32':
files += [ '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']
compileFlags = ['-x','objective-c++',]
files += [ 'cocoaGL.m', ]
conf.CheckPKG('OpenGL')
if gfxenv['HAVE_OPENCL']:
gfxenv['FRAMEWORKS'] += ['OpenCL']
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 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 += [
'Win32.cpp'
]
libs += [
env['base_dir'] + '/Externals/Cg/'
]
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(
LINKFLAGS = linkFlags,
)
gfxenv.SharedLibrary(
env['plugin_dir']+name,
files,
LIBS = libs + gfxenv['LIBS']
)