Table of Contents

Building with PhysX

https://nvidia-omniverse.github.io/PhysX/physx/5.1.3/docs/BuildingWithPhysX.html


Build Configurations

编译配置

The SDK has four build configurations available, designed for different stages of development and deployment.

Redistribution

分发,需要依赖的DLL有哪些,Lib的数量比DLL的数量多,因为有些是静态链接(?)

  1. PhysXCommon_*.dll - will always be needed.
  2. PhysX_*.dll - will always be needed.
  3. PhysXFoundation_*.dll - will always be needed.
  4. PhysXCooking_*.dll - you only need to bundle if your application cooks geometry data on the fly.
  5. PhysXGPU_*.dll - is only needed if your application runs some simulation on the GPU.
Where * is a platform specific suffix, e.g. 32 or 64. You will need one or the other depending on whether your application is built in 64 bit mode.

Customize CMake presets

It is possible to customize the CMake presets, which are stored in “physx/buildtools/presets/public/”. Each XML file represents one preset, depending on the platform some CMake switches can be toggled.

可以自行修改CMake的构建选项,每一个XML是一个构建配置,可以在其中打开关闭某些选项

比如在Windows上,以下开关都可以修改:

  1. PX_GENERATE_STATIC_LIBRARIES - it is possible to switch the PhysX build to output static libs instead of DLLs - default False
  2. NV_USE_STATIC_WINCRT - sets static or dynamic runtime usage - default True
  3. NV_USE_DEBUG_WINCRT - specify whether debug CRT should be used - default True
  4. PX_FLOAT_POINT_PRECISE_MATH - it is possible to switch to precise math rather than fast math, this is beneficial especially for robotics projects, which do require higher precision - default False