OSX: refine logic for NDOF, if WITH_BF_3DMOUSE is disabled also never do weak-link...
[blender.git] / SConstruct
index 75b88c36e4ce00e00899c5f4d3d807009af14eb5..4f7e8d0481016e2e21a57109949d9d7f4be6db92 100644 (file)
@@ -272,12 +272,12 @@ if env['OURPLATFORM']=='darwin':
     # for now, Mac builders must download and install the 3DxWare 10 Beta 4 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
-    else:
-        env.Append(LINKFLAGS=['-weak_framework','3DconnexionClient'])
-
+    if env['WITH_BF_3DMOUSE'] == 1
+        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
+        else:
+            env.Append(LINKFLAGS=['-weak_framework','3DconnexionClient'])
 
 if env['WITH_BF_OPENMP'] == 1:
         if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):