fixed ndof library detect for Mac SCons, ndof enabled by default (disabled if lib...
authorMike Erwin <significant.bit@gmail.com>
Sun, 7 Aug 2011 16:29:05 +0000 (16:29 +0000)
committerMike Erwin <significant.bit@gmail.com>
Sun, 7 Aug 2011 16:29:05 +0000 (16:29 +0000)
SConstruct
build_files/scons/config/darwin-config.py

index 4f920190276714e11a1fb021489d1cb06da5ce58..b422892680d6797dc0062d3e86ac62223db515cd 100644 (file)
@@ -255,13 +255,12 @@ if 'blenderlite' in B.targets:
 
 # detect presence of 3D_CONNEXION_CLIENT_LIBRARY for OSX
 if env['OURPLATFORM']=='darwin':
-    envi = Environment()
-    conf = Configure(envi)
-    if not conf.CheckCHeader('ConnexionClientAPI.h'): # CheckCXXHeader if it is c++ !
+    # for now, Mac builders must download and install the driver framework from 3Dconnexion
+    # necessary header file lives here when installed:
+    # /Library/Frameworks/3DconnexionClient.framework/Versions/Current/Headers/ConnexionClientAPI.h
+    if not os.path.exists('/Library/Frameworks/3DconnexionClient.framework'):
         print "3D_CONNEXION_CLIENT_LIBRARY not found, disabling WITH_BF_3DMOUSE" # avoid build errors !
         env['WITH_BF_3DMOUSE'] = 0
-    envi = conf.Finish()
-
 
 if env['WITH_BF_OPENMP'] == 1:
         if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
index 97e8e90e574a07d398b47aac75a0e1276a972e8a..a8bad81324cde8930c7bd5906b60f9bfe29902d7 100644 (file)
@@ -199,7 +199,7 @@ BF_GETTEXT_INC = '${BF_GETTEXT}/include'
 BF_GETTEXT_LIB = 'intl'
 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
 
-WITH_BF_GAMEENGINE=True
+WITH_BF_GAMEENGINE = True
 WITH_BF_PLAYER = False
 
 WITH_BF_BULLET = True
@@ -277,7 +277,7 @@ elif MACOSX_ARCHITECTURE == 'x86_64':
     BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-msse2']
 
 # SpaceNavigator and related 3D mice
-WITH_BF_3DMOUSE = False
+WITH_BF_3DMOUSE = True
 
 #############################################################################
 ###################  various compile settings and flags    ##################
@@ -296,13 +296,13 @@ CPPFLAGS = []+ARCH_FLAGS
 CCFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
 CXXFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
 
-if WITH_GHOST_COCOA==True:
+if WITH_GHOST_COCOA:
        PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
 else:
        PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Carbon','-framework','AGL','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
 
-if WITH_BF_QUICKTIME == True:
-       if USE_QTKIT == True:
+if WITH_BF_QUICKTIME:
+       if USE_QTKIT:
                PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QTKit']
        else:
                PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
@@ -313,14 +313,14 @@ if WITH_BF_3DMOUSE:
 #note to build succesfully on 10.3.9 SDK you need to patch  10.3.9 by adding the SystemStubs.a lib from 10.4
 LLIBS = ['stdc++', 'SystemStubs']
 
-# some flags shuffling for different Os versions
+# some flags shuffling for different OS versions
 if MAC_MIN_VERS == '10.3':
        CFLAGS = ['-fuse-cxa-atexit']+CFLAGS
        CXXFLAGS = ['-fuse-cxa-atexit']+CXXFLAGS
        PLATFORM_LINKFLAGS = ['-fuse-cxa-atexit']+PLATFORM_LINKFLAGS
        LLIBS.append('crt3.o')
        
-if USE_SDK==True:
+if USE_SDK:
        SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS,'-arch',MACOSX_ARCHITECTURE]    
        PLATFORM_LINKFLAGS = ['-mmacosx-version-min='+MAC_MIN_VERS,'-Wl','-isysroot',MACOSX_SDK,'-arch',MACOSX_ARCHITECTURE]+PLATFORM_LINKFLAGS
        CCFLAGS=SDK_FLAGS+CCFLAGS