HipsterSloth / PSVRTracker

A sample app demonstrating position and orientation tracking for the PSVR headset
MIT License
37 stars 12 forks source link

PSVRConfigTool CMake build directory wrong or working directory (debugging) wrong one? #16

Closed m-7761 closed 5 years ago

m-7761 commented 5 years ago

Right now I'm trying to get the PSVRConfigTool to work. The generated VS project has it build to $(ProjectDir)Debug in Debug mode. The working-directory for running/testing the program is $(ProjectDir) so that the relative paths to the assets folder and so on are inaccessible.

I don't know. The "ProjectDir" macro is defined as the following:

\PSVRTracker\build\src\psvrconfigtool

Should it build to the dist directory instead? Or is that for INSTALL targets only? Either way, running this program from Visual Studio doesn't work. I have yet to try the others.

HipsterSloth commented 5 years ago

Yeah I need to update the cmake script to set the working directory correctly. When I'm debugging locally I just set the working directory to the 'dist\Win64\Debug\bin' folder

m-7761 commented 5 years ago

Note, there are more folders missing: resources, source_assets; but if these programs make use of one another, it probably makes more sense to set up a post-build event to copy the program files, and change the debugging EXE over to the matching dist folder.

If you have a personal project folder, I recommend putting that inside the files, since CMake generated VS projects are never as good as the real thing. They are best for building, and not doing development work.

m-7761 commented 5 years ago

Update: FWIW today I tried working out of the dist directory, and could not make MSVC2015 break into the PSVRService.dll code. Even copying the DLL/PDB into the dist folder would not find the breakpoints.

I really thought that would work. Maybe there is a workaround. But it's not so simple. Probably better to change the $(TargetPath) variable. Or use a non-CMake project.

m-7761 commented 5 years ago

Obsoleted since CMake is removed.