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:
parent
d888f13bb9
commit
8b9b66911f
15
SConstruct
15
SConstruct
|
@ -126,9 +126,10 @@ if sys.platform == 'darwin':
|
||||||
env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.6.sdk' + system]
|
env['CCFLAGS'] += ['-iframework/Developer/SDKs/MacOSX10.6.sdk' + system]
|
||||||
env['CC'] = "gcc-4.2 -ObjC"
|
env['CC'] = "gcc-4.2 -ObjC"
|
||||||
env['CXX'] = "g++-4.2 -ObjC++"
|
env['CXX'] = "g++-4.2 -ObjC++"
|
||||||
env['FRAMEWORKS'] += ['AppKit', 'CoreFoundation', 'CoreServices']
|
env['FRAMEWORKS'] += ['AppKit', 'Carbon', 'CoreFoundation', 'CoreServices']
|
||||||
env['FRAMEWORKS'] += ['AudioUnit', 'CoreAudio']
|
env['FRAMEWORKS'] += ['AudioUnit', 'CoreAudio', 'WebKit']
|
||||||
env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL']
|
env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL']
|
||||||
|
env['FRAMEWORKSFLAGS'] = ['-Xarch_i386', '-Wl,-framework,QuickTime']
|
||||||
env['LIBPATH'] += ['/usr/lib']
|
env['LIBPATH'] += ['/usr/lib']
|
||||||
env['LIBS'] = ['iconv', 'SDL']
|
env['LIBS'] = ['iconv', 'SDL']
|
||||||
env['LINKFLAGS'] += ccld
|
env['LINKFLAGS'] += ccld
|
||||||
|
@ -137,12 +138,12 @@ if sys.platform == 'darwin':
|
||||||
|
|
||||||
if platform.mac_ver()[0] >= '10.6.0':
|
if platform.mac_ver()[0] >= '10.6.0':
|
||||||
env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof']
|
env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof']
|
||||||
env['FRAMEWORKSFLAGS'] = ['-weak_framework', 'OpenCL']
|
env['FRAMEWORKSFLAGS'] += ['-weak_framework', 'OpenCL']
|
||||||
|
|
||||||
if env['nowx']:
|
if env['nowx']:
|
||||||
env['HAVE_WX'] = 0
|
env['HAVE_WX'] = 0
|
||||||
else:
|
else:
|
||||||
wxenv = env.Clone(LIBPATH = '')
|
wxenv = env.Clone(CPPPATH = '', LIBPATH = '', LIBS = '')
|
||||||
conf = wxenv.Configure(conf_dir = None, log_file = None,
|
conf = wxenv.Configure(conf_dir = None, log_file = None,
|
||||||
custom_tests = {'CheckWXConfig' : wxconfig.CheckWXConfig})
|
custom_tests = {'CheckWXConfig' : wxconfig.CheckWXConfig})
|
||||||
env['HAVE_WX'] = \
|
env['HAVE_WX'] = \
|
||||||
|
@ -154,9 +155,7 @@ if sys.platform == 'darwin':
|
||||||
Exit(1)
|
Exit(1)
|
||||||
wxconfig.ParseWXConfig(wxenv)
|
wxconfig.ParseWXConfig(wxenv)
|
||||||
env['CPPDEFINES'] += ['__WXOSX_COCOA__']
|
env['CPPDEFINES'] += ['__WXOSX_COCOA__']
|
||||||
env['CPPPATH'] = wxenv['CPPPATH']
|
env['CPPPATH'] += wxenv['CPPPATH']
|
||||||
if not wxenv['CPPDEFINES'].count('WXUSINGDLL'):
|
|
||||||
env['FRAMEWORKS'] = wxenv['FRAMEWORKS']
|
|
||||||
env['LIBPATH'] += wxenv['LIBPATH']
|
env['LIBPATH'] += wxenv['LIBPATH']
|
||||||
env['wxconfiglibs'] = wxenv['LIBS']
|
env['wxconfiglibs'] = wxenv['LIBS']
|
||||||
|
|
||||||
|
@ -180,6 +179,8 @@ elif sys.platform == 'win32':
|
||||||
|
|
||||||
else:
|
else:
|
||||||
env['CCFLAGS'] += ['-fPIC', '-msse2', '-pthread']
|
env['CCFLAGS'] += ['-fPIC', '-msse2', '-pthread']
|
||||||
|
if env['CCVERSION'] >= '4.2.0':
|
||||||
|
env['CXXFLAGS'] += ['-fvisibility-inlines-hidden']
|
||||||
env['CPPDEFINES'] += ['HAVE_CONFIG_H']
|
env['CPPDEFINES'] += ['HAVE_CONFIG_H']
|
||||||
env['CPPPATH'].insert(0, '#') # Make sure we pick up our own config.h
|
env['CPPPATH'].insert(0, '#') # Make sure we pick up our own config.h
|
||||||
env['LINKFLAGS'] += ['-pthread']
|
env['LINKFLAGS'] += ['-pthread']
|
||||||
|
|
|
@ -31,6 +31,7 @@ else()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(SRCS ${SRCS} Src/DSoundStream.cpp)
|
set(SRCS ${SRCS} Src/DSoundStream.cpp)
|
||||||
|
set(SRCS ${SRCS} Src/XAudio2Stream.cpp)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ else:
|
||||||
files += [ 'PulseAudioStream.cpp' ]
|
files += [ 'PulseAudioStream.cpp' ]
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
files += [ 'DSoundStream.cpp' ]
|
files += [ 'DSoundStream.cpp' ]
|
||||||
if sys.platform == 'win32':
|
|
||||||
files += [ 'XAudio2Stream.cpp' ]
|
files += [ 'XAudio2Stream.cpp' ]
|
||||||
|
|
||||||
env.StaticLibrary(env['local_libs'] + 'audiocommon', files)
|
env.StaticLibrary(env['local_libs'] + 'audiocommon', files)
|
||||||
|
|
|
@ -58,10 +58,8 @@ elif sys.platform == 'darwin' and not env['HAVE_WX']:
|
||||||
files += [ 'cocoaApp.m' ]
|
files += [ 'cocoaApp.m' ]
|
||||||
exeNoGUI = '#' + env['prefix'] + '/DolphinNoGUI'
|
exeNoGUI = '#' + env['prefix'] + '/DolphinNoGUI'
|
||||||
elif sys.platform == 'darwin' and env['HAVE_WX']:
|
elif sys.platform == 'darwin' and env['HAVE_WX']:
|
||||||
exeGUI = 'Dolphin'
|
|
||||||
exeGUIdist = '#' + env['prefix'] + '/Dolphin.app/Contents/MacOS/Dolphin'
|
|
||||||
|
|
||||||
wxlibs += env['wxconfiglibs']
|
wxlibs += env['wxconfiglibs']
|
||||||
|
exeGUI = '#' + env['prefix'] + '/Dolphin.app/Contents/MacOS/Dolphin'
|
||||||
|
|
||||||
env.Install('#' + env['prefix'] + '/Dolphin.app/Contents/' +
|
env.Install('#' + env['prefix'] + '/Dolphin.app/Contents/' +
|
||||||
'Library/Frameworks/Cg.framework',
|
'Library/Frameworks/Cg.framework',
|
||||||
|
@ -89,14 +87,6 @@ elif sys.platform == 'darwin' and env['HAVE_WX']:
|
||||||
LSMinimumSystemVersion = '10.5.0',
|
LSMinimumSystemVersion = '10.5.0',
|
||||||
LSRequiresCarbon = True,
|
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:
|
else:
|
||||||
files += [ 'X11Utils.cpp' ]
|
files += [ 'X11Utils.cpp' ]
|
||||||
libs += [ 'SDL' ]
|
libs += [ 'SDL' ]
|
||||||
|
|
Loading…
Reference in New Issue