Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OVRhead set cmake build issues for Windows and solution #6

Open
mebbaid opened this issue May 5, 2018 · 3 comments
Open

OVRhead set cmake build issues for Windows and solution #6

mebbaid opened this issue May 5, 2018 · 3 comments

Comments

@mebbaid
Copy link
Contributor

mebbaid commented May 5, 2018

The following should be noted when dealing with overhead set dependencies:

  • LibOVR and LibOVRKerenel: If you are using the newer versions of both libraries, make sure to go to yarp/cmake/ycm-0.6.0/find-modules/FindLibOVR.cmake and add the following to your _arch variable definition loop: if(MSVC) set(_arch "VS2015") endif()
    (I am using VS2017 to build a 2015 LibOVRKernel.lib, if you are building a 2017 LibOVRKernel.lib, then replace VS2015 in the code snippet above with VS2017 as that would be the folder generated. I can/will modify/patch the FindLibOVR cmake file).
  • GLEW: cmake uses it's own standard FindGLEW module, however, if you installed GLEW in a non-standard directory, make sure to set CMAKE_PREFIX_PATH user env variable to point to that directory, so cmake can find it.
  • GLFW: The FindGLFW cmake uses (among the at least 3-5 versions you have on your computer, depending on if you built yarp using the robotology-superbuild or not) is located in yarp/cmake/ycm-0.6.0/find-modules/, any editing needed should be done there.

After configuring and generating the solution, depending on the OculusSDK version you are using, you might face the following error:

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorC2039'HmdToEyeOffset': is not a member of
'ovrEyeRenderDesc_'yarp_ovrheadsetC:\Users\Alex\robotology\yarp\src\devices\ovrheadset\OVRHeadset.cpp896

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorC2664'void ovr_CalcEyePoses2(ovrPosef,const ovrPosef [],ovrPosef
[])': cannot convert argument 2 from 'ovrVector3f [2]' to 'const
ovrPosef
[]'yarp_ovrheadsetC:\Users\Alex\robotology\yarp\src\devices\ovrheadset\OVRHeadset.cpp898 

This is due to the breaking changes in the OculusSDK reported here, this also will be patched.

@traversaro
Copy link
Member

traversaro commented May 5, 2018

Some small comments:

  • I think we should track the changes necessary in Find<...>.cmake in a separate issue in the robotology/ycm repository, as those files are mantained there and just imported in YARP for convenience.
  • What changes are necessary in FindGLFW.cmake file?
  • CMAKE_PREFIX_PATH, both the environmental variable and the CMake variable, is always written as all uppercase, not as cmake_prefix_path.

@mebbaid
Copy link
Contributor Author

mebbaid commented May 5, 2018

@traversaro : regarding your question: if GLFW3 was installed using vcpkg install --triplet x64-windows glfw3 then this current FindGLFW3.cmake will not return GLFW3_INCLUDE_DIRS and GLFW3_LIBRARIES variables, and when building the generated solution , Visual studio throws LNK1181 error. Agreed regarding moving to YCM, didn't know which is the most relevant repo to put the issue. As for the variable name, yeah, my mistake, a typo.

Edited to add: in case of using vcpkg as above, a way to return the variables is to change the line if(NOT GLFW3_FOUND) in the find module to if( GLFW3_FOUND) and it compiles, however, i am not sure if that has unforeseen implications, since i trust Daniele's work more.

@traversaro
Copy link
Member

I see. Spawning a new issue for replying on the FindGLFW3.cmake .

@traversaro traversaro transferred this issue from robotology/yarp Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants