소스 검색

This should fix compilation errors with Maya 2011 on OSX

rdb 15 년 전
부모
커밋
17a8d045bf
2개의 변경된 파일13개의 추가작업 그리고 6개의 파일을 삭제
  1. 12 5
      makepanda/makepanda.py
  2. 1 1
      makepanda/makepandacore.py

+ 12 - 5
makepanda/makepanda.py

@@ -541,13 +541,20 @@ if (COMPILER=="LINUX"):
 
 
     for pkg in MAYAVERSIONS:
     for pkg in MAYAVERSIONS:
         if (PkgSkip(pkg)==0 and (pkg in SDK)):
         if (PkgSkip(pkg)==0 and (pkg in SDK)):
-            # On OSX, the dir *can* be named 'MacOS' instead of 'lib'.
             if (sys.platform == "darwin"):
             if (sys.platform == "darwin"):
-                if (os.path.isdir(SDK[pkg] + "/lib")):   LibDirectory(pkg, SDK[pkg] + "/lib")
-                if (os.path.isdir(SDK[pkg] + "/MacOS")): LibDirectory(pkg, SDK[pkg] + "/MacOS")
+                # Sheesh, Autodesk really can't make up their mind
+                # regarding the location of the Maya devkit on OS X.
+                if (os.path.isdir(SDK[pkg] + "/Maya.app/Contents/lib")):
+                    LibDirectory(pkg, SDK[pkg] + "/Maya.app/Contents/lib")
+                if (os.path.isdir(SDK[pkg] + "/Maya.app/Contents/MacOS")):
+                    LibDirectory(pkg, SDK[pkg] + "/Maya.app/Contents/MacOS")
+                if (os.path.isdir(SDK[pkg] + "/Maya.app/Contents/include/maya")):
+                    IncDirectory(pkg, SDK[pkg] + "/Maya.app/Contents/include")
+                if (os.path.isdir(SDK[pkg] + "/devkit/include/maya")):
+                    IncDirectory(pkg, SDK[pkg] + "/devkit/include")
             else:
             else:
                 LibDirectory(pkg, SDK[pkg] + "/lib")
                 LibDirectory(pkg, SDK[pkg] + "/lib")
-            IncDirectory(pkg, SDK[pkg] + "/include")
+                IncDirectory(pkg, SDK[pkg] + "/include")
             DefSymbol(pkg, "MAYAVERSION", pkg)
             DefSymbol(pkg, "MAYAVERSION", pkg)
 
 
     if (sys.platform == "darwin"):
     if (sys.platform == "darwin"):
@@ -556,7 +563,7 @@ if (COMPILER=="LINUX"):
         LibName("AGL", "-framework AGL")
         LibName("AGL", "-framework AGL")
         LibName("CARBON", "-framework Carbon")
         LibName("CARBON", "-framework Carbon")
         LibName("COCOA", "-framework Cocoa")
         LibName("COCOA", "-framework Cocoa")
-        # Fix for a bug in OSX:
+        # Fix for a bug in OSX Leopard:
         LibName("OPENGL", "-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
         LibName("OPENGL", "-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
 
 
     for pkg in MAYAVERSIONS:
     for pkg in MAYAVERSIONS:

+ 1 - 1
makepanda/makepandacore.py

@@ -1331,7 +1331,7 @@ def SdkLocateMaya():
                             res = res.replace("\\", "/").rstrip("/")
                             res = res.replace("\\", "/").rstrip("/")
                             SDK[ver] = res
                             SDK[ver] = res
                 elif (sys.platform == "darwin"):
                 elif (sys.platform == "darwin"):
-                    ddir = "/Applications/Autodesk/maya"+key+"/Maya.app/Contents"
+                    ddir = "/Applications/Autodesk/maya"+key
                     if (os.path.isdir(ddir)): SDK[ver] = ddir
                     if (os.path.isdir(ddir)): SDK[ver] = ddir
                 else:
                 else:
                     if (platform.architecture()[0] == "64bit"):
                     if (platform.architecture()[0] == "64bit"):