dolphin/Source/Plugins/Plugin_VideoOGL/Src/SConscript

72 lines
1.6 KiB
Python
Raw Normal View History

Import('env')
import sys
files = [
'BPStructs.cpp',
'DataReader.cpp',
'Globals.cpp',
'GLInit.cpp',
'main.cpp',
'memcpy_amd.cpp',
'OpcodeDecoding.cpp',
# 'OpcodeReaders.cpp', # outdated
'PixelShader.cpp',
'PixelShaderManager.cpp',
'rasterfont.cpp',
'Render.cpp',
'TextureMngr.cpp',
'VertexLoader.cpp',
'VertexLoader_Normal.cpp',
'VertexShader.cpp',
'VertexShaderManager.cpp',
'XFB.cpp',
'GUI/ConfigDlg.cpp',
]
compileFlags = [
'-fPIC',
'`wx-config --cppflags`',
]
linkFlags = [
'`wx-config --libs`',
]
libs = [
'videocommon', 'common', 'GLEW',
]
if sys.platform == 'darwin':
platform = 'mac'
# SDL is currently the only way to get video on Mac OS X.
useSDL = True
# Use libraries from MacPorts.
compileFlags.append('-I/opt/local/include')
linkFlags.append('-L/opt/local/lib')
# Use frameworks instead of plain libs, when possible.
linkFlags += [
'-framework %s' % framework
for framework in [ 'OpenGL', 'Cg' ]
]
else:
platform = 'linux'
# By default, GLX is used on Linux to setup OpenGL, but you can select SDL
# instead if you like, by changing the line below.
useSDL = False
# Libraries with pkg-config support.
compileFlags.append('`pkg-config --cflags xxf86vm`')
linkFlags.append('`pkg-config --libs xxf86vm`')
# Libraries without pkg-config support.
libs += [ 'GL', 'Cg', 'CgGL', 'X11' ]
if useSDL:
compileFlags += [ '`sdl-config --cflags`', '-DUSE_SDL=1' ]
linkFlags += [ '`sdl-config --libs`' ]
gfxenv = env.Copy()
gfxenv.Append(
CXXFLAGS = ' ' + ' '.join(compileFlags),
LINKFLAGS = ' ' + ' '.join(linkFlags)
)
gfxenv.SharedLibrary(
'../../../../Binary/%s/Plugins/zeroogl.so' % platform,
files,
LIBS = libs
)