2009-10-12 16:29:32 +00:00
|
|
|
# -*- 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',
|
2009-10-13 06:12:58 +00:00
|
|
|
'RasterFont.cpp',
|
2009-10-12 16:29:32 +00:00
|
|
|
'Renderer.cpp',
|
|
|
|
'SetupUnit.cpp',
|
|
|
|
'Statistics.cpp',
|
|
|
|
'Tev.cpp',
|
|
|
|
'TextureEncoder.cpp',
|
|
|
|
'TextureSampler.cpp',
|
|
|
|
'TransformUnit.cpp',
|
|
|
|
'VertexFormatConverter.cpp',
|
|
|
|
'VertexLoader.cpp',
|
|
|
|
'VideoConfig.cpp',
|
|
|
|
'XFMemLoader.cpp',
|
|
|
|
]
|
|
|
|
compileFlags = [
|
|
|
|
'-fPIC',
|
|
|
|
]
|
|
|
|
linkFlags = [
|
|
|
|
]
|
|
|
|
libs = [
|
2010-03-09 22:17:33 +00:00
|
|
|
'videocommon', 'SOIL', 'common'
|
2009-10-12 16:29:32 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
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']
|
2009-12-23 07:37:59 +00:00
|
|
|
compileFlags += ['-x','objective-c++',]
|
|
|
|
files += [ 'cocoaGL.m', ]
|
2009-10-12 16:29:32 +00:00
|
|
|
|
|
|
|
conf.CheckPKG('OpenGL')
|
2009-12-23 09:11:12 +00:00
|
|
|
if gfxenv['HAVE_OPENCL']:
|
|
|
|
gfxenv['FRAMEWORKS'] += ['OpenCL']
|
2009-10-12 16:29:32 +00:00
|
|
|
|
|
|
|
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(
|
|
|
|
CXXFLAGS = compileFlags,
|
|
|
|
LINKFLAGS = linkFlags,
|
|
|
|
)
|
|
|
|
|
|
|
|
gfxenv.SharedLibrary(
|
|
|
|
env['plugin_dir']+name,
|
|
|
|
files,
|
|
|
|
LIBS = libs + gfxenv['LIBS']
|
|
|
|
)
|