Move fullscreen display resolution control to the GUI with the rest of the fullscreen...
[dolphin.git] / Source / Plugins / Plugin_VideoSoftware / Src / SConscript
blob7077459a16ab6c56b3fabe197a039f2746d73647
1 # -*- python -*-
3 Import('env')
4 # can we import path in one place?
5 import sys
6 sys.path.append(env['base_dir']+'SconsTests')
7 import utils
8 import platform
10 name = "Plugin_VideoSoftware"
12 files = [
13         'BPMemLoader.cpp',
14         'Clipper.cpp',
15         'CommandProcessor.cpp',
16         'CPMemLoader.cpp',
17         'DebugUtil.cpp',
18         'EfbCopy.cpp',
19         'EfbInterface.cpp',
20         'GLUtil.cpp',
21         'HwRasterizer.cpp',
22         'main.cpp',
23         'OpcodeDecoder.cpp',
24         'PixelEngine.cpp',
25         'Rasterizer.cpp',
26         'RasterFont.cpp',
27         'Renderer.cpp',
28         'SetupUnit.cpp',
29         'Statistics.cpp',
30         'Tev.cpp',
31         'TextureEncoder.cpp',
32         'TextureSampler.cpp',
33         'TransformUnit.cpp',
34         'VertexFormatConverter.cpp',
35         'VertexLoader.cpp',
36         'VideoConfig.cpp',
37         'XFMemLoader.cpp',
38         ]
39 compileFlags = [
40         '-fPIC',
41         ]
42 linkFlags = [
43         ]
44 libs = [
45         'videocommon', 'SOIL', 'common'
46         ]
48 gfxenv = env.Clone()
50 if sys.platform == 'win32':
51         files += [ 'Win32.cpp' ]
53 tests = {'CheckPKG' : utils.CheckPKG}
54 conf = gfxenv.Configure(custom_tests = tests,
55                         config_h=env['base_dir']+"Source/Core/Common/Src/Config.h")
57 if sys.platform == 'darwin':
58         gfxenv['FRAMEWORKS'] = ['CoreFoundation', 'System', 'OpenGL', 'Cocoa', 'Cg']
59         compileFlags += ['-x','objective-c++',]
60         files += [ 'cocoaGL.m', ]
62         conf.CheckPKG('OpenGL')
63         if gfxenv['HAVE_OPENCL']:
64                 gfxenv['FRAMEWORKS'] += ['OpenCL']
66 elif sys.platform == 'win32':
67         print name + " is assuming that you have opengl, glu, cg, and cggl"
68 else:
69         if not (conf.CheckPKG('GL') and conf.CheckPKG('GLU')):
70                 print name + " must have opengl and glu to be build"
71                 Return()
72         
73 if sys.platform == 'win32':
74         print name + " is assuming that you have glew"
75 else:
76         if not conf.CheckPKG('GLEW'):
77                 print name + " must have glew to be build"
78                 Return()
81 if sys.platform == 'win32':
82         files += [
83                 'Win32.cpp'
84                 ]
85         libs += [
86                 env['base_dir'] + '/Externals/Cg/'
87                 ]       
88         gfxenv['CPPPATH'] += libs
89         
90 conf.Finish()
92 # Sanity check
93 if gfxenv['USE_WX'] and not gfxenv['HAVE_WX']:
94     print "Must have wx to use wxgl"
95     Return()
96 gfxenv.Append(
97         CXXFLAGS = compileFlags,
98         LINKFLAGS = linkFlags,
99         )
101 gfxenv.SharedLibrary(
102         env['plugin_dir']+name,
103         files,
104         LIBS =  libs + gfxenv['LIBS']
105         )