Unity-Technologies / com.unity.webrtc

WebRTC package for Unity
Other
738 stars 185 forks source link

chore: Add cmake presets for Ninja generator #948

Closed karasusan closed 11 months ago

karasusan commented 11 months ago

This PR changes the CMake generator to Ninja from Visual Studio for building windows native plugin.

We are going to use CUDA kernel for the next change. However, CMake doesn't support CUDA with clang-cl on Windows (issue link). In addition, building code with MSVC is unstable because clang compiler is default to build webrtc.

Ninja generator supports CUDA on windows, and Visual Studio supports to load CMake project.

You need to install ninja and clang to use Ninja on your environment.

choco install ninja llvm

Please read this document how to use cmake project in Visual Studio 2022.