AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Mozilla Public License 2.0
2.63k stars 648 forks source link

[BUILD] NanoVDB - OptiX Root Directory #955

Open nachovizzo opened 3 years ago

nachovizzo commented 3 years ago

Environment

Operating System: Ubuntu 20.04 Version / Commit SHA: feature/nanovdb CMake Version: 3.18 Compiler: GCC 9

Describe the problem

Can't find the OptiX root directory

$ cmake ..
 /// etc ...
CMake Warning at cmd/CMakeLists.txt:235 (message):
   - OptiX not found for Viewer. Removing OptiX support.

I've checked the FindOptix.cmake that's in the repo and I found that the variable ${Optix_Root} is being used but not exposed to the user through cmake: https://github.com/AcademySoftwareFoundation/openvdb/blob/9b79bb0dd66a442149083c8093deefcb03f881c3/nanovdb/cmake/FindOptiX.cmake#L26

If it helps it's quite easy to fix in Linux, just run this and it works

$ cmake -DOptiX_ROOT=<PATH_TO_OptiX> ..

I know this feature branch is still a work in progress, so I'm not complaining :angel: I'm just raising the issue in case any other developer is seeing the same issue.

I'm happy to expose this flag to the build system if you are accepting PR's

kmuseth commented 3 years ago

looking into this now