OSX: introduced a workaround for compiling with non-apple gcc-4.6.1, ghost must be compiled with apple-gcc nevertheless due objc incompatibilities
This commit is contained in:
@@ -695,7 +695,7 @@ class BlenderEnvironment(SConsEnvironment):
|
|||||||
SConsEnvironment.Default(self, res)
|
SConsEnvironment.Default(self, res)
|
||||||
resources.append(res)
|
resources.append(res)
|
||||||
|
|
||||||
def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None):
|
def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None, cc_compilerchange=None, cxx_compilerchange=None):
|
||||||
global vcp
|
global vcp
|
||||||
if not self or not libname or not sources:
|
if not self or not libname or not sources:
|
||||||
print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC
|
print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC
|
||||||
@@ -733,6 +733,10 @@ class BlenderEnvironment(SConsEnvironment):
|
|||||||
lenv.Replace(CCFLAGS = cc_compileflags)
|
lenv.Replace(CCFLAGS = cc_compileflags)
|
||||||
if cxx_compileflags:
|
if cxx_compileflags:
|
||||||
lenv.Replace(CXXFLAGS = cxx_compileflags)
|
lenv.Replace(CXXFLAGS = cxx_compileflags)
|
||||||
|
if cc_compilerchange:
|
||||||
|
lenv.Replace(CC = cc_compilerchange)
|
||||||
|
if cxx_compilerchange:
|
||||||
|
lenv.Replace(CXX = cxx_compilerchange)
|
||||||
lenv.Append(CFLAGS = lenv['C_WARN'])
|
lenv.Append(CFLAGS = lenv['C_WARN'])
|
||||||
lenv.Append(CCFLAGS = lenv['CC_WARN'])
|
lenv.Append(CCFLAGS = lenv['CC_WARN'])
|
||||||
lenv.Append(CXXFLAGS = lenv['CXX_WARN'])
|
lenv.Append(CXXFLAGS = lenv['CXX_WARN'])
|
||||||
|
@@ -101,5 +101,10 @@ if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-v
|
|||||||
|
|
||||||
if window_system in ('win32-vc', 'win64-vc'):
|
if window_system in ('win32-vc', 'win64-vc'):
|
||||||
env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15]) #, cc_compileflags=env['CCFLAGS'].append('/WX') )
|
env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15]) #, cc_compileflags=env['CCFLAGS'].append('/WX') )
|
||||||
|
|
||||||
|
elif env['OURPLATFORM'] == 'darwin' and env['CC'].endswith('4.6.1'): # compile ghost always with apple-gcc to keep objectiveC compatibility
|
||||||
|
env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15], cc_compilerchange='/usr/bin/gcc-4.2', cxx_compilerchange='/usr/bin/gcc-4.2' ) #, cc_compileflags=env['CXXFLAGS'].append('-fobjc-exceptions')
|
||||||
|
print "GHOST COCOA WILL BE COMPILED WITH APPLE GCC"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15] )
|
env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15] )
|
||||||
|
Reference in New Issue
Block a user