PatrickPalmer / Omniverse-Connect-cmake

Omniverse Connect example using cmake build system
4 stars 3 forks source link

Omniverse Connector Sample using CMake Build generator

NVidia had provided instructions to hand wire in the Omniverse Connector Sample into a Visual Studio project. For more structured C++ projects, cmake is common. This repo codifies the steps in the NVidia document into a cmake project. This should be considered a lightweight simple integration though and not the level you'd expect if NVidia USD was packaged for distribution. Proper USD Cmake module should use modern CMake with optional loading of USD components and using target properties. But this is enough to get started. Currently hardwired to Connect Sample v 200.0.0.

Setup

Build

mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A x64 ..

NVidia suggests copying the NVidia USD and Omniverse Client libraries locally. By default, this isn't done. To do it, add the option COPY_CONNECT_LOCALLY to cmake to copy the libraries into the build deps directory.

cmake -G "Visual Studio 16 2019" -A x64 -DCOPY_CONNECT_LOCALLY=ON ..

If the Omniverse Client libraries are not installed in the default location of %LOCALAPPDATA%\ov\pkg, set the OmniverseConnectSample_ROOT variable.

cmake -G "Visual Studio 16 2019" -A x64 -DOmniverseConnectSample_ROOT=D:/Omniverse/Library/connectsample-200.0.0 ..

Reference