bjornblissing / osgoculusviewer

An OsgViewer with support for the Oculus Rift
Other
106 stars 67 forks source link

Trouble compiling #80

Closed Ghostbird closed 8 years ago

Ghostbird commented 8 years ago

Can anyone give a pointer in the right direction? It doesn't seem to detect the OculusSDK.

/d/osg-toolchain/cmake-3.3.2/bin/cmake -G "Unix Makefiles" -DOSG_DIR=/d/osg-toolchain/OpenSceneGraph-3.4.0 -DOSG_THIRD_PARTY_DIR=/d/osg-toolchain/osg_thirdparty/ -DOCULUS_SDK_ROOT_DIR=/d/osg-toolchain/OculusSDK ..
-- Found osgViewer: d:/osg-toolchain/OpenSceneGraph-3.4.0/build/lib/libosgViewer.dll.a
-- Found osgDB: d:/osg-toolchain/OpenSceneGraph-3.4.0/build/lib/libosgDB.dll.a
-- Found osgGA: d:/osg-toolchain/OpenSceneGraph-3.4.0/build/lib/libosgGA.dll.a
-- Found osgUtil: d:/osg-toolchain/OpenSceneGraph-3.4.0/build/lib/libosgUtil.dll.a
-- Found OpenThreads: d:/osg-toolchain/OpenSceneGraph-3.4.0/build/lib/libOpenThreads.dll.a
-- Found OpenSceneGraph: d:/osg-toolchain/OpenSceneGraph-3.4.0/build/lib/libosgViewer.dll.a;d:/osg-toolchain/OpenSceneGraph-3.4.0/build/lib/libosgDB.dll.a;d:/osg-toolchain/OpenSceneGraph-3.4.0/build/lib/libosgGA.dll.a;d:/osg-toolchain/OpenSceneGraph-3.4.0/build/lib/libosgUtil.dll.a;d:/osg-toolchain/OpenSceneGraph-3.4.0/build/lib/libosg.dll.a;d:/osg-toolchain/OpenSceneGraph-3.4.0/build/lib/libOpenThreads.dll.a (found version "3.4.0")
CMake Error at d:/osg-toolchain/cmake-3.3.2/share/cmake-3.3/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find OculusSDK (missing: OCULUS_SDK_LIBRARIES)
Call Stack (most recent call first):
  d:/osg-toolchain/cmake-3.3.2/share/cmake-3.3/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindOculusSDK.cmake:103 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:56 (FIND_PACKAGE)

So far I've been digging through the findOculus cmake file and related files and I've been unable to find out why it cannot find the Oculus SDK.

Ghostbird commented 8 years ago

Using the CMake GUI I can see that it correctly sets OCULUS_SDK_INCLUDE_DIRS to OculusSDK\LibOVR\Include, but apparently it can't find (all that) it's looking for there.

What should be the value of OCULUS_SDK_LIBRARIES? It seems to be constructed out of OCULUS_SDK_LIBRARY and OCULUS_SDK_LIBRARY_DEBUG, but if I set those two manually, they get deleted by CMake.

bjornblissing commented 8 years ago

Please note that Oculus ended Linux support with SDK 0.5.0.1 being the last version with Linux support. So you have to use the corresponding tagged version/bransh of osgoculusviewer. The latest versions are windows exclusive.

Ghostbird commented 8 years ago

I'm running windows, as you can see, the paths start with d: I found a way around it. I removed the lines that marked the OCULUS_SDK_LIBRARY and OCULUS_SDK_LIBRARY_DEBUG as advanced, generated a new configuration, then manually set the values to the correct library files, this allowed me to continue.

bjornblissing commented 8 years ago

Oh, sorry about that. I saw the Unix makefile and the .a file endings and assumed that you were compiling on Linux. Are you using MinGW?