64-bit PhysX

This commit is contained in:
rdb 2013-10-07 10:48:33 +00:00
parent 3753602ef9
commit f3a7c94172
2 changed files with 25 additions and 9 deletions

View File

@ -589,16 +589,20 @@ if (COMPILER == "MSVC"):
LibName(pkg, SDK[pkg] + '/lib/maxutil.lib')
LibName(pkg, SDK[pkg] + '/lib/paramblk2.lib')
if (PkgSkip("PHYSX")==0):
LibName("PHYSX", SDK["PHYSX"] + "/lib/Win32/PhysXLoader.lib")
LibName("PHYSX", SDK["PHYSX"] + "/lib/Win32/NxCharacter.lib")
if GetTargetArch() == 'x64':
LibName("PHYSX", SDK["PHYSXLIBS"] + "/PhysXLoader64.lib")
LibName("PHYSX", SDK["PHYSXLIBS"] + "/NxCharacter64.lib")
else:
LibName("PHYSX", SDK["PHYSXLIBS"] + "/PhysXLoader.lib")
LibName("PHYSX", SDK["PHYSXLIBS"] + "/NxCharacter.lib")
IncDirectory("PHYSX", SDK["PHYSX"] + "/Physics/include")
IncDirectory("PHYSX", SDK["PHYSX"] + "/PhysXLoader/include")
IncDirectory("PHYSX", SDK["PHYSX"] + "/NxCharacter/include")
IncDirectory("PHYSX", SDK["PHYSX"] + "/NxExtensions/include")
IncDirectory("PHYSX", SDK["PHYSX"] + "/Foundation/include")
IncDirectory("PHYSX", SDK["PHYSX"] + "/Cooking/include")
# We need to be able to find NxCharacter.dll when importing code library libpandaphysx
AddToPathEnv("PATH", SDK["PHYSX"]+"/../Bin/win32/")
if (PkgSkip("SPEEDTREE")==0):
if GetTargetArch() == 'x64':
libdir = SDK["SPEEDTREE"] + "/Lib/Windows/VC10.x64/"

View File

@ -1885,10 +1885,10 @@ def SdkLocateMacOSX(osxtarget = None):
SDK["MACOSX"] = ""
# Latest first
PHYSXVERSIONINFO=[
("PHYSX284","v2.8.4"),
("PHYSX283","v2.8.3"),
("PHYSX281","v2.8.1"),
PHYSXVERSIONINFO = [
("PHYSX284", "v2.8.4"),
("PHYSX283", "v2.8.3"),
("PHYSX281", "v2.8.1"),
]
def SdkLocatePhysX():
@ -1899,6 +1899,9 @@ def SdkLocatePhysX():
SDK["PHYSXLIBS"] = dir + "/lib"
return
if CrossCompiling():
return
# Try to find a PhysX installation on the system.
for (ver, key) in PHYSXVERSIONINFO:
if (GetHost() == "windows"):
@ -1906,8 +1909,17 @@ def SdkLocatePhysX():
for folder in ListRegistryValues(folders):
if folder.endswith("NVIDIA PhysX SDK\\%s\\SDKs\\" % key) or \
folder.endswith("NVIDIA PhysX SDK\\%s_win\\SDKs\\" % key):
SDK["PHYSX"] = folder
return
if GetTargetArch() == 'x64':
SDK["PHYSXLIBS"] = folder + "/lib/win64"
AddToPathEnv("PATH", folder + "/../Bin/win64/")
else:
SDK["PHYSXLIBS"] = folder + "/lib/win32"
AddToPathEnv("PATH", folder + "/../Bin/win32/")
return
elif (GetHost() == "linux"):
incpath = "/usr/include/PhysX/%s/SDKs" % key
libpath = "/usr/lib/PhysX/%s" % key