1. Home
  2. Browse
  3. physx

physx

v5.3.0#1Go to latest

The NVIDIA PhysX SDK is a scalable multi-platform physics solution supporting a wide range of devices, from smartphones to high-end multicore CPUs and GPUs. This is the latest NVIDIA official version of the PhysX engine which also directly integrates into Omniverse. This port is NOT officially supported by NVIDIA.

Install

Run the following Vcpkg command to install the port.

vcpkg install physx

Usage

[Sample port usage]

physx provides CMake targets:

cmake_minimum_required(VERSION 3.15)
find_package(unofficial-omniverse-physx-sdk CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::omniverse-physx-sdk::sdk)
# Optional: import the defined target to copy over the GPU acceleration libraries (3rd party provided by NVIDIA)
if(TARGET unofficial::omniverse-physx-sdk::gpu-library)
    if(UNIX)
        # Add rpath setting to find .so libraries on unix based systems
        set_target_properties(main PROPERTIES
            BUILD_WITH_INSTALL_RPATH TRUE
            INSTALL_RPATH "$ORIGIN"
        )
    endif()
    add_custom_command(TARGET main POST_BUILD
                    COMMAND ${CMAKE_COMMAND} -E copy_if_different
                    $<TARGET_FILE:unofficial::omniverse-physx-sdk::gpu-library>
                    $<TARGET_FILE_DIR:main>)
    if(WIN32)
        add_custom_command(TARGET main POST_BUILD
                        COMMAND ${CMAKE_COMMAND} -E copy_if_different
                        $<TARGET_FILE:unofficial::omniverse-physx-sdk::gpu-device-library>
                        $<TARGET_FILE_DIR:main>)
    endif()
else()
    message(WARNING "GPU acceleration library target not defined - GPU acceleration will NOT be available!")
endif()

Dependencies

See source

Version

v5.3.0#1

Publication

Supports

(windows & x64 & !mingw & !uwp) | (linux & x64) | (linux & arm64)

GitHub

NVIDIA-Omniverse/PhysX2.7K

Homepage

github.com/NVIDIA-Omniverse/PhysX

Subtree

10474e022c

License

BSD-3-Clause

Definition

Manifest