2009-01-15 07:48:15 +01:00
|
|
|
# -*- python -*-
|
2008-09-21 21:54:29 +02:00
|
|
|
|
2008-07-12 19:40:22 +02:00
|
|
|
Import('env')
|
2008-09-24 19:47:51 +02:00
|
|
|
# can we import path in one place?
|
2008-08-06 23:07:31 +02:00
|
|
|
import sys
|
2008-11-13 09:12:48 +01:00
|
|
|
sys.path.append(env['base_dir']+'SconsTests')
|
2008-09-24 19:47:51 +02:00
|
|
|
import utils
|
2008-12-09 22:46:32 +01:00
|
|
|
import platform
|
2008-07-12 19:40:22 +02:00
|
|
|
|
2008-11-13 09:12:48 +01:00
|
|
|
name = "Plugin_VideoOGL"
|
2008-11-11 21:59:48 +01:00
|
|
|
|
2008-08-26 02:18:00 +02:00
|
|
|
files = [
|
2009-06-22 11:31:30 +02:00
|
|
|
'BPFunctions.cpp',
|
2009-08-10 08:18:10 +02:00
|
|
|
'DLCache.cpp',
|
2009-10-13 08:12:58 +02:00
|
|
|
'RasterFont.cpp',
|
2008-08-26 02:18:00 +02:00
|
|
|
'Render.cpp',
|
|
|
|
'TextureMngr.cpp',
|
2008-10-25 01:08:46 +02:00
|
|
|
'NativeVertexFormat.cpp',
|
2008-12-26 12:23:59 +01:00
|
|
|
'PixelShaderCache.cpp',
|
|
|
|
'VertexShaderCache.cpp',
|
2008-11-11 08:31:40 +01:00
|
|
|
'TextureConverter.cpp',
|
2008-12-26 14:19:27 +01:00
|
|
|
'VertexManager.cpp',
|
|
|
|
'VertexLoaderManager.cpp',
|
2008-08-26 02:18:00 +02:00
|
|
|
'XFB.cpp',
|
2009-06-29 20:40:10 +02:00
|
|
|
'PostProcessing.cpp',
|
|
|
|
'FramebufferManager.cpp',
|
2008-08-26 02:18:00 +02:00
|
|
|
]
|
|
|
|
compileFlags = [
|
2008-08-27 00:28:42 +02:00
|
|
|
'-fPIC',
|
2008-08-26 02:18:00 +02:00
|
|
|
]
|
|
|
|
linkFlags = [
|
|
|
|
]
|
|
|
|
libs = [
|
2010-02-22 17:10:08 +01:00
|
|
|
'videocommon', 'soil', 'common'
|
2008-08-26 02:18:00 +02:00
|
|
|
]
|
2008-09-21 00:06:22 +02:00
|
|
|
|
|
|
|
gfxenv = env.Clone()
|
|
|
|
|
2009-09-09 21:52:45 +02:00
|
|
|
files += [
|
|
|
|
'main.cpp',
|
|
|
|
'GLUtil.cpp',
|
|
|
|
]
|
2009-11-09 00:36:14 +01:00
|
|
|
if sys.platform != 'darwin':
|
|
|
|
if gfxenv['HAVE_OPENCL']:
|
|
|
|
libs += [ 'OpenCL']
|
2008-12-05 14:46:19 +01:00
|
|
|
if gfxenv['HAVE_WX']:
|
2008-10-25 19:47:46 +02:00
|
|
|
files += [
|
2008-12-05 14:46:19 +01:00
|
|
|
'GUI/ConfigDlg.cpp',
|
2009-03-07 23:12:01 +01:00
|
|
|
'Debugger/Debugger.cpp',
|
2008-12-05 14:46:19 +01:00
|
|
|
]
|
2008-10-25 19:47:46 +02:00
|
|
|
|
2008-12-10 19:33:13 +01:00
|
|
|
if gfxenv['HAVE_COCOA']:
|
|
|
|
files += [ 'cocoaGL.m' ]
|
|
|
|
compileFlags += [
|
|
|
|
'-x',
|
|
|
|
'objective-c++',
|
|
|
|
]
|
Some scons updates,
windows scons will build if dirs =
'Externals/Bochs_disasm',
'Externals/LZO',
'Externals/WiiUseSrc/Src',
#'Source/Core/Common/Src',
#'Source/Core/Core/Src',
# 'Source/Core/DiscIO/Src',
# 'Source/Core/VideoCommon/Src',
#'Source/Core/InputCommon/Src',
'Source/Plugins/Plugin_VideoOGL/Src',
#'Source/Plugins/Plugin_DSP_HLE/Src',
'Source/Plugins/Plugin_DSP_LLE/Src',
'Source/Plugins/Plugin_PadSimple/Src',
'Source/Plugins/Plugin_PadSimpleEvnt/Src',
# 'Source/Plugins/Plugin_nJoy_SDL/Src',
#'Source/Plugins/Plugin_nJoy_Testing/Src',
#'Source/Plugins/Plugin_Wiimote/Src',
# 'Source/Core/DolphinWX/Src',
'Source/Core/DebuggerWX/Src',
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2627 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-03-09 01:36:59 +01:00
|
|
|
if sys.platform == 'win32':
|
|
|
|
files += [ 'OS/Win32.cpp' ]
|
2009-03-07 23:12:01 +01:00
|
|
|
|
2008-12-06 23:28:32 +01:00
|
|
|
tests = {'CheckPKG' : utils.CheckPKG}
|
2008-12-09 22:46:32 +01:00
|
|
|
conf = gfxenv.Configure(custom_tests = tests,
|
2008-12-12 12:57:15 +01:00
|
|
|
config_h=env['base_dir']+"Source/Core/Common/Src/Config.h")
|
2008-12-06 23:28:32 +01:00
|
|
|
|
2008-12-09 22:46:32 +01:00
|
|
|
if sys.platform == 'darwin':
|
2009-09-18 22:04:54 +02:00
|
|
|
gfxenv['FRAMEWORKS'] = ['CoreFoundation', 'System', 'OpenGL', 'Cocoa', 'Cg']
|
2009-11-09 00:36:14 +01:00
|
|
|
if gfxenv['HAVE_OPENCL']:
|
|
|
|
gfxenv['FRAMEWORKS'] += ['OpenCL']
|
2009-09-18 22:04:54 +02:00
|
|
|
|
2009-03-07 23:12:01 +01:00
|
|
|
conf.CheckPKG('OpenGL')
|
|
|
|
if not conf.CheckPKG('Cg'):
|
|
|
|
print name + " must have Cg framework from nvidia to be build"
|
2009-09-18 22:04:54 +02:00
|
|
|
Return()
|
2008-12-09 19:10:16 +01:00
|
|
|
|
2009-03-07 22:05:03 +01:00
|
|
|
elif sys.platform == 'win32':
|
|
|
|
print name + " is assuming that you have opengl, glu, cg, and cggl"
|
2008-12-09 19:10:16 +01:00
|
|
|
else:
|
2009-01-15 07:48:15 +01:00
|
|
|
if not (conf.CheckPKG('GL') and conf.CheckPKG('GLU')):
|
2008-12-09 22:46:32 +01:00
|
|
|
print name + " must have opengl and glu to be build"
|
|
|
|
Return()
|
2009-03-07 23:12:01 +01:00
|
|
|
|
|
|
|
if not conf.CheckPKG('Cg') or not conf.CheckPKG('CgGL'):
|
2008-12-10 19:33:13 +01:00
|
|
|
print name + " must have cg and cggl to be build"
|
|
|
|
Return()
|
2009-03-07 22:05:03 +01:00
|
|
|
if sys.platform == 'win32':
|
2009-03-07 23:12:01 +01:00
|
|
|
print name + " is assuming that you have glew"
|
2009-03-07 22:05:03 +01:00
|
|
|
else:
|
2009-03-07 23:12:01 +01:00
|
|
|
if not conf.CheckPKG('GLEW'):
|
|
|
|
print name + " must have glew to be build"
|
|
|
|
Return()
|
|
|
|
|
|
|
|
|
|
|
|
if sys.platform == 'win32':
|
|
|
|
files += [
|
|
|
|
'OS/Win32.cpp'
|
|
|
|
]
|
|
|
|
libs += [
|
|
|
|
env['base_dir'] + '/Externals/Cg/'
|
|
|
|
]
|
|
|
|
gfxenv['CPPPATH'] += libs
|
|
|
|
|
2008-12-06 23:28:32 +01:00
|
|
|
|
2010-02-16 05:59:45 +01:00
|
|
|
# check for Xrandr
|
|
|
|
gfxenv['HAVE_XRANDR'] = gfxenv['HAVE_X11'] and conf.CheckPKG('xrandr')
|
2008-12-06 23:28:32 +01:00
|
|
|
|
2010-02-16 05:59:45 +01:00
|
|
|
conf.Define('HAVE_XRANDR', gfxenv['HAVE_XRANDR'])
|
2008-12-06 23:28:32 +01:00
|
|
|
|
2008-12-09 19:10:16 +01:00
|
|
|
conf.Finish()
|
2008-12-06 23:28:32 +01:00
|
|
|
|
2008-12-14 00:19:56 +01:00
|
|
|
# Sanity check
|
|
|
|
if gfxenv['USE_WX'] and not gfxenv['HAVE_WX']:
|
|
|
|
print "Must have wx to use wxgl"
|
|
|
|
Return()
|
2008-08-27 00:28:42 +02:00
|
|
|
gfxenv.Append(
|
2008-09-21 00:06:22 +02:00
|
|
|
CXXFLAGS = compileFlags,
|
2008-09-23 02:11:33 +02:00
|
|
|
LINKFLAGS = linkFlags,
|
2008-08-26 02:18:00 +02:00
|
|
|
)
|
2008-09-21 00:06:22 +02:00
|
|
|
|
2009-03-07 23:12:01 +01:00
|
|
|
gfxenv.SharedLibrary(
|
2008-11-13 09:12:48 +01:00
|
|
|
env['plugin_dir']+name,
|
2008-08-26 02:18:00 +02:00
|
|
|
files,
|
2008-10-28 15:19:28 +01:00
|
|
|
LIBS = libs + gfxenv['LIBS']
|
2008-08-26 02:18:00 +02:00
|
|
|
)
|