# OptiX CMake build setup with modern CUDA

**URL:** <https://forums.developer.nvidia.com/t/optix-cmake-build-setup-with-modern-cuda/369433>\
**Category:** OptiX\
**Created:** [May 8, 2026, 11:34am UTC](https://forums.developer.nvidia.com/t/optix-cmake-build-setup-with-modern-cuda/369433 "2026-05-08T11:34:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![darofearth](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@darofearth](https://forums.developer.nvidia.com/u/darofearth)\
**Post date:** [May 8, 2026, 12:57pm UTC](https://forums.developer.nvidia.com/t/optix-cmake-build-setup-with-modern-cuda/369433/2 "2026-05-08T12:57:15Z")

</div>

If you find the CMake script using the nvcuda\_compile\_module.cmake, which BTW can translate to PTX and OptiX-IR intermediate representations, too involved, have a look at the GLTF\_renderer example which is using native CMake features namely LANGUAGES CUDA for native CUDA kernels and a CMake “Object Library” for the OptiX device code.

Read this post and the linked one in there for explanations:

[https://forums.developer.nvidia.com/t/optix-advanced-samples-on-github/48410/19](https://forums.developer.nvidia.com/t/optix-advanced-samples-on-github/48410/19)

See the dedicated [README.md](https://github.com/NVIDIA/OptiX_Apps/blob/master/apps/GLTF_renderer/doc/README.md) for similar information.

In any case, the advanced examples always use the CMake-provided FindCUDAToolkit.cmake to determine the CUDA SDK installation on your system. There is some hierarchy of methods that uses to find that, but under Windows, it normally boils down to the folder referenced by the CUDA\_PATH environment variable.

---

_[View the full topic](https://forums.developer.nvidia.com/t/optix-cmake-build-setup-with-modern-cuda/369433)._
