Mac:
Fixed gcc-4.0 compile error (cocoa) Updated scons to build cocoa (32bit & 64bit) (Thx Jens Verwiebe for the patch): - make sure right python is unzipped to app-bundle ( printing information at the end of compiling ) - make sure arch-setting appends needed flags ( depending on OSX-version obsolete sometimes but harmless ) - link correct frameworks depending on gfx-api ( cocoa/carbon) - conscript prepared for cocoa objC-files - link to openAL-framework, using the headers from blender-lib + the symbols in framework Usage instruction: The default build is Cocoa 32bit. To change it, copy config/darwin-config.py to user-config.py in the blender folder, and edit: - WITH_GHOST_COCOA & MACOSX_ARCHITECTURE variables to select cocoa/carbon, and the arch (i386, X86_64, ppc, ..) - the libs options as usual
This commit is contained in:
@@ -6,7 +6,17 @@ Import ('env')
|
||||
|
||||
window_system = env['OURPLATFORM']
|
||||
|
||||
sources = env.Glob('intern/*.cpp')
|
||||
sources = env.Glob('intern/*.cpp') + env.Glob('intern/*.mm')
|
||||
|
||||
if env['WITH_GHOST_COCOA'] == True:
|
||||
env.Append(CFLAGS=['-DGHOST_COCOA'])
|
||||
env.Append(CXXFLAGS=['-DGHOST_COCOA'])
|
||||
env.Append(CPPFLAGS=['-DGHOST_COCOA'])
|
||||
|
||||
#defs = ''
|
||||
#if env['WITH_GHOST_COCOA']:
|
||||
# defs += 'GHOST_COCOA'
|
||||
# maybe we need it later
|
||||
|
||||
pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_Window']
|
||||
|
||||
@@ -19,9 +29,17 @@ elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64
|
||||
sources.remove('intern' + os.sep + f + 'X11.cpp')
|
||||
sources.remove('intern' + os.sep + f + 'Carbon.cpp')
|
||||
elif window_system == 'darwin':
|
||||
for f in pf:
|
||||
sources.remove('intern' + os.sep + f + 'Win32.cpp')
|
||||
sources.remove('intern' + os.sep + f + 'X11.cpp')
|
||||
if env['WITH_GHOST_COCOA']:
|
||||
for f in pf:
|
||||
sources.remove('intern' + os.sep + f + 'Win32.cpp')
|
||||
sources.remove('intern' + os.sep + f + 'X11.cpp')
|
||||
sources.remove('intern' + os.sep + f + 'Carbon.cpp')
|
||||
else:
|
||||
for f in pf:
|
||||
sources.remove('intern' + os.sep + f + 'Win32.cpp')
|
||||
sources.remove('intern' + os.sep + f + 'X11.cpp')
|
||||
sources.remove('intern' + os.sep + f + 'Cocoa.mm')
|
||||
|
||||
else:
|
||||
print "Unknown window system specified."
|
||||
Exit()
|
||||
@@ -30,3 +48,4 @@ incs = '. ../string ' + env['BF_OPENGL_INC']
|
||||
if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
|
||||
incs = env['BF_WINTAB_INC'] + ' ' + incs
|
||||
env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['intern','player'], priority = [40,15] )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user