vcpkg/ports/omniverse-physx-sdk/usage

31 lines
1.4 KiB
Plaintext
Raw Normal View History

[omniverse-physx-sdk] Add new port (#31506) * [omniverse-physx-sdk] add new port * test * new direct cmake invocation * Windows fixes * Cleanup * Cleanup * license update * Fix for windows * fix crt * new fix for CRT * another tentative for crt * new fixes * crt linkage * win32 dynamic/static fixes * updated * wrapper modified * Refactoring to config as requested * fixed paths for config * new test * fixing gpu port * fixups for bin dirs * more fixes, win pending for dll * new * useless removed * cleanup * fixed static * custom targets * fix static * Moved target to unofficial * remove vcpkg-cmake-wrapper.cmake * dropped custom logic * modified config with find_file * linux fixes * mods * Refactoring and usage * do not copy freeglut dlls over * addresses https://github.com/microsoft/vcpkg/pull/31506#pullrequestreview-1466815035 * tentative deps download * Removed override generator * removed hardcoded generator/toolchain * usage refactoring, changed target defines * Restored CRT linkage (toolchain failed) * refactored * Removed useless var * namespaced better * modified linux not to use 7z * consistent extract paths * fixed linux extraction * No more CRT in port/config, moved GPU accel to bin dir, usage refactored * retriggering build * updated to tools dir only release * usage refactor * refactor * usage refactor * refactor * desc update * updated * updated desc * small comment change * fixup * fixup * Removed baseline failures * Update versions/baseline.json Co-authored-by: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com> --------- Co-authored-by: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com>
2023-07-06 03:20:45 +08:00
[Sample port usage]
omniverse-physx-sdk 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()