Clean up OS X wx library handling a bit.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6403 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2010-11-14 06:02:44 +00:00
parent d888f13bb9
commit 8b9b66911f
4 changed files with 10 additions and 19 deletions

View File

@ -126,9 +126,10 @@ if sys.platform == 'darwin':
env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.6.sdk' + system]
env['CC'] = "gcc-4.2 -ObjC"
env['CXX'] = "g++-4.2 -ObjC++"
env['FRAMEWORKS'] += ['AppKit', 'CoreFoundation', 'CoreServices']
env['FRAMEWORKS'] += ['AudioUnit', 'CoreAudio']
env['FRAMEWORKS'] += ['AppKit', 'Carbon', 'CoreFoundation', 'CoreServices']
env['FRAMEWORKS'] += ['AudioUnit', 'CoreAudio', 'WebKit']
env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL']
env['FRAMEWORKSFLAGS'] = ['-Xarch_i386', '-Wl,-framework,QuickTime']
env['LIBPATH'] += ['/usr/lib']
env['LIBS'] = ['iconv', 'SDL']
env['LINKFLAGS'] += ccld
@ -137,12 +138,12 @@ if sys.platform == 'darwin':
if platform.mac_ver()[0] >= '10.6.0':
env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof']
env['FRAMEWORKSFLAGS'] = ['-weak_framework', 'OpenCL']
env['FRAMEWORKSFLAGS'] += ['-weak_framework', 'OpenCL']
if env['nowx']:
env['HAVE_WX'] = 0
else:
wxenv = env.Clone(LIBPATH = '')
wxenv = env.Clone(CPPPATH = '', LIBPATH = '', LIBS = '')
conf = wxenv.Configure(conf_dir = None, log_file = None,
custom_tests = {'CheckWXConfig' : wxconfig.CheckWXConfig})
env['HAVE_WX'] = \
@ -154,9 +155,7 @@ if sys.platform == 'darwin':
Exit(1)
wxconfig.ParseWXConfig(wxenv)
env['CPPDEFINES'] += ['__WXOSX_COCOA__']
env['CPPPATH'] = wxenv['CPPPATH']
if not wxenv['CPPDEFINES'].count('WXUSINGDLL'):
env['FRAMEWORKS'] = wxenv['FRAMEWORKS']
env['CPPPATH'] += wxenv['CPPPATH']
env['LIBPATH'] += wxenv['LIBPATH']
env['wxconfiglibs'] = wxenv['LIBS']
@ -180,6 +179,8 @@ elif sys.platform == 'win32':
else:
env['CCFLAGS'] += ['-fPIC', '-msse2', '-pthread']
if env['CCVERSION'] >= '4.2.0':
env['CXXFLAGS'] += ['-fvisibility-inlines-hidden']
env['CPPDEFINES'] += ['HAVE_CONFIG_H']
env['CPPPATH'].insert(0, '#') # Make sure we pick up our own config.h
env['LINKFLAGS'] += ['-pthread']

View File

@ -31,6 +31,7 @@ else()
if(WIN32)
set(SRCS ${SRCS} Src/DSoundStream.cpp)
set(SRCS ${SRCS} Src/XAudio2Stream.cpp)
endif(WIN32)
endif()

View File

@ -24,7 +24,6 @@ else:
files += [ 'PulseAudioStream.cpp' ]
if sys.platform == 'win32':
files += [ 'DSoundStream.cpp' ]
if sys.platform == 'win32':
files += [ 'XAudio2Stream.cpp' ]
env.StaticLibrary(env['local_libs'] + 'audiocommon', files)

View File

@ -58,10 +58,8 @@ elif sys.platform == 'darwin' and not env['HAVE_WX']:
files += [ 'cocoaApp.m' ]
exeNoGUI = '#' + env['prefix'] + '/DolphinNoGUI'
elif sys.platform == 'darwin' and env['HAVE_WX']:
exeGUI = 'Dolphin'
exeGUIdist = '#' + env['prefix'] + '/Dolphin.app/Contents/MacOS/Dolphin'
wxlibs += env['wxconfiglibs']
exeGUI = '#' + env['prefix'] + '/Dolphin.app/Contents/MacOS/Dolphin'
env.Install('#' + env['prefix'] + '/Dolphin.app/Contents/' +
'Library/Frameworks/Cg.framework',
@ -89,14 +87,6 @@ elif sys.platform == 'darwin' and env['HAVE_WX']:
LSMinimumSystemVersion = '10.5.0',
LSRequiresCarbon = True,
)))
def Fixup(target, source, env):
if env['CPPDEFINES'].count('WXUSINGDLL'):
pass
os.link(str(source[0]), str(target[0]))
env.Append(BUILDERS = {'Fixup' : Builder(action = Fixup)})
env.Depends(exeGUIdist, env['plugin_dir'])
env.Fixup(exeGUIdist, exeGUI)
else:
files += [ 'X11Utils.cpp' ]
libs += [ 'SDL' ]