ValveSoftware / unity-xr-plugin

OpenVR plugin for Unity's XR API
BSD 3-Clause "New" or "Revised" License
309 stars 64 forks source link

Suggest using CMAKE_BINARY_DIR to copy vc142.pdb for a CMake out-of-source build #27

Open areong opened 4 years ago

areong commented 4 years ago

Problem

I built from source with Visual Studio Code CMake Tools, and the build process exited with an error copying file unity-xr-plugin/XRSDKOPENVR.dir/Release/vc142.pdb.

Configurations: VS Community 2019 Release x86_amd64

Proposed solution

At line 165 in CMakeLists.txt, replace CMAKE_SOURCE_DIR with CMAKE_BINARY_DIR such that the path to the PDB file becomes unity-xr-plugin/build/XRSDKOPENVR.dir/Release/vc142.pdb in an out-of-source build. CMake builds successfully with this modification. I did not test the built binaries however.

rpavlik commented 3 years ago

fwiw, this is resolved by #55

areong commented 3 years ago

fwiw, this is resolved by #55

@rpavlik Wow thank you. I have not tried your pr yet.