aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/physx/usage
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/physx/usage
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/physx/usage')
-rw-r--r--vcpkg/ports/physx/usage30
1 files changed, 30 insertions, 0 deletions
diff --git a/vcpkg/ports/physx/usage b/vcpkg/ports/physx/usage
new file mode 100644
index 0000000..80051f9
--- /dev/null
+++ b/vcpkg/ports/physx/usage
@@ -0,0 +1,30 @@
+[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()