OSVR-Tracker-Viewer icon indicating copy to clipboard operation
OSVR-Tracker-Viewer copied to clipboard

CMake Error : Could NOT find OpenSceneGraph

Open zoozooll opened this issue 9 years ago • 3 comments

I compiled the source code with cmake. I set entries like follow:

-DBOOST_ROOT="C:/local/boost_1_62_0" ^
-DBOOST_LIBRARYDIR="C:/local/boost_1_62_0/lib64-msvc-12.0" ^
-Dosvr_DIR="d:/Project/OSVR-Build/OSVR/OSVR-Core/build" ^

and show error like follow:

CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find OpenSceneGraph (missing: OPENSCENEGRAPH_LIBRARIES
OPENTHREADS_FOUND OSGDB_FOUND OSGVIEWER_FOUND OSGGA_FOUND OSGUTIL_FOUND
OSG_FOUND)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.7/Modules/FindOpenSceneGraph.cmake:223 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:11 (find_package)

zoozooll avatar Jan 09 '17 07:01 zoozooll

Have you installed OpenSceneGraph?

godbyk avatar Jan 09 '17 07:01 godbyk

Yes. downloaded and compiled it. But I don't know how to set the values for OPENSCENEGRAPH_LIBRARIES OPENTHREADS_FOUND OSGDB_FOUND OSGVIEWER_FOUND OSGGA_FOUND OSGUTIL_FOUND

zoozooll avatar Jan 09 '17 08:01 zoozooll

It modified cmake cmd like this:

cmake -G "Visual Studio 14 2015 Win64" .. ^
-DBOOST_ROOT=D:/workspaces/boost_1_62_0 ^
-DBOOST_LIBRARYDIR=D:/workspaces/boost_1_62_0/lib64-msvc-12.0 ^
-DCMAKE_PREFIX_PATH=D:/workspaces/OSVR-Core/build;D:/workspaces/OpenSceneGraph-3.4.0/OpenSceneGraph-3.4.0/build

The error message was different:

-- Could NOT find OpenThreads (missing:  OPENTHREADS_LIBRARY OPENTHREADS_INCLUDE_DIR)
-- Could NOT find osgDB (missing:  OSGDB_LIBRARY OSGDB_INCLUDE_DIR)
-- Could NOT find osgViewer (missing:  OSGVIEWER_LIBRARY OSGVIEWER_INCLUDE_DIR)
-- Could NOT find osgGA (missing:  OSGGA_LIBRARY OSGGA_INCLUDE_DIR)
-- Could NOT find osgUtil (missing:  OSGUTIL_LIBRARY OSGUTIL_INCLUDE_DIR)
-- Could NOT find osg (missing:  OSG_LIBRARY)
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find OpenSceneGraph (missing: OPENTHREADS_FOUND OSGDB_FOUND
  OSGVIEWER_FOUND OSGGA_FOUND OSGUTIL_FOUND OSG_FOUND) (found version
  "3.4.0")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.7/Modules/FindOpenSceneGraph.cmake:223 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:11 (find_package)

zoozooll avatar Jan 17 '17 03:01 zoozooll