Check for wxWidgets 2.9.2 (trunk really) which the OS X build now requires.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7115 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2011-02-08 12:26:47 +00:00
parent 00c35451f6
commit c163237d6f
2 changed files with 21 additions and 15 deletions

View File

@ -114,29 +114,34 @@ rev = utils.GenerateRevFile(env['flavor'], '.', None)
# OS X specifics # OS X specifics
if sys.platform == 'darwin': if sys.platform == 'darwin':
#ccld = ['-mmacosx-version-min=10.5.4']
#ccld += ['-arch', 'x86_64', '-mssse3']
#ccld += ['-arch', 'i386', '-msse3']
ccld = ['-arch', 'x86_64', '-arch', 'i386', '-mmacosx-version-min=10.5.4'] ccld = ['-arch', 'x86_64', '-arch', 'i386', '-mmacosx-version-min=10.5.4']
env['CCFLAGS'] += ccld env['CCFLAGS'] += ccld
env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof']
env['CCFLAGS'] += ['-march=core2', '-mdynamic-no-pic']
env['CCFLAGS'] += ['-Xarch_i386', '-msse3', '-Xarch_x86_64', '-mssse3'] env['CCFLAGS'] += ['-Xarch_i386', '-msse3', '-Xarch_x86_64', '-mssse3']
env['CCFLAGS'] += ['-march=core2', '-mdynamic-no-pic']
env['CCFLAGS'] += ['-Wextra-tokens', '-Wnewline-eof']
env['CXXFLAGS'] += ['-x', 'objective-c++'] env['CXXFLAGS'] += ['-x', 'objective-c++']
env['FRAMEWORKS'] += ['AudioToolbox', 'AudioUnit', 'Carbon', 'Cocoa'] env['FRAMEWORKS'] += ['ApplicationServices', 'AudioUnit', 'Cocoa']
env['FRAMEWORKS'] += ['CoreAudio', 'CoreFoundation', 'CoreServices'] env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL']
env['FRAMEWORKS'] += ['IOBluetooth', 'IOKit', 'OpenGL', 'WebKit']
env['LIBPATH'] += ['/usr/lib'] # XXX clang
env['LINKFLAGS'] += ccld env['LINKFLAGS'] += ccld
env['LINKFLAGS'] += ['-Wl,-dead_strip,-dead_strip_dylibs'] env['LINKFLAGS'] += ['-Wl,-dead_strip,-dead_strip_dylibs']
env['LINKFLAGS'] += ['-Wl,-pagezero_size,0x1000'] env['LINKFLAGS'] += ['-Wl,-pagezero_size,0x1000']
env['LINKFLAGS'] += ['-Wl,-search_paths_first']
env['CC'] = '/Developer/usr/bin/llvm-gcc'
env['CXX'] = '/Developer/usr/bin/llvm-g++'
#env['CC'] = '/Developer/usr/bin/clang'
#env['CXX'] = '/Developer/usr/bin/clang++'
#if float(os.popen('xcode-select -version').read()[21:]) < 2000:
# print 'Xcode 4 is required to build Dolphin'
# print 'It is available from http://developer.apple.com/devcenter/mac/'
# Exit(1)
if env['ENV'].has_key('CC'): if env['ENV'].has_key('CC'):
env['CC'] = env['ENV']['CC'] env['CC'] = env['ENV']['CC']
else:
env['CC'] = '/Developer/usr/bin/llvm-gcc'
if env['ENV'].has_key('CXX'): if env['ENV'].has_key('CXX'):
env['CXX'] = env['ENV']['CXX'] env['CXX'] = env['ENV']['CXX']
else:
env['CXX'] = '/Developer/usr/bin/llvm-g++'
if env['nowx']: if env['nowx']:
env['HAVE_WX'] = 0 env['HAVE_WX'] = 0
@ -145,11 +150,12 @@ if sys.platform == 'darwin':
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'] = \
conf.CheckWXConfig(2.9, 'aui adv core base gl'.split(), conf.CheckWXConfig(2.92, 'aui adv core base gl'.split(),
env['flavor'] == 'debug') env['flavor'] == 'debug')
conf.Finish() conf.Finish()
if not env['HAVE_WX']: if not env['HAVE_WX']:
print "wxWidgets 2.9 not found using " + env['wxconfig'] print 'wxWidgets 2.9.2 not found using ' + wxenv['wxconfig']
print 'See http://code.google.com/p/dolphin-emu/wiki/MacOSX_Build'
Exit(1) Exit(1)
wxconfig.ParseWXConfig(wxenv) wxconfig.ParseWXConfig(wxenv)
env['CPPDEFINES'] += ['__WXOSX_COCOA__'] env['CPPDEFINES'] += ['__WXOSX_COCOA__']

View File

@ -27,9 +27,9 @@ def SystemWXConfig(env, args):
# Check version of wx-config # Check version of wx-config
# It succeeds with a warning if version check failed. # It succeeds with a warning if version check failed.
def CheckWXConfigVersion(context, version): def CheckWXConfigVersion(context, version):
releaseversion = SystemWXConfig(context.env,'--release')[1] releaseversion = SystemWXConfig(context.env,'--version-full')[1]
try: try:
if float(version) > float(releaseversion.strip()): if float(version) > float(releaseversion.replace('.', '')) / 1000:
return False return False
except (ValueError, TypeError): except (ValueError, TypeError):
context.Message('version check failed, but ok... ') context.Message('version check failed, but ok... ')