[osg-users] [forum] CMake can't find libraries

Rodrigo Dias rodrigo1406 at gmail.com
Tue Jan 1 16:26:09 PST 2019


Hi,

I'm following OpenSceneGraph 3.0: Beginner's Guide (https://www.packtpub.com/game-development/openscenegraph-30-beginners-guide), and right at page 44 there is a CMakeLists.txt that won't work. CMake is giving the following error message:


> Could NOT find OpenThreads (missing:  OPENTHREADS_LIBRARY) 
> Could NOT find osg (missing:  OSG_LIBRARY) 
> Could NOT find osgDB (missing:  OSGDB_LIBRARY) 
> Could NOT find osgUtil (missing:  OSGUTIL_LIBRARY) 
> Could NOT find osgViewer (missing:  OSGVIEWER_LIBRARY) 
> Configuring done
> 


The book says "make sure you have the OSG_ROOT environment variable set. Otherwise, the find_package() macro may not be able to find OSG installations correctly."

This variable is set to the directory of the build, the one which includes applications, bin, data, include, lib, packaging and src. However, the "include" directory only contains OpenThreads and osg, while /usr/local/include contains 18 directories (from a previous installation, I guess). Also, the OpenThreads in the build directory only contains two files: Config and Version, while the one in /usr/local/include contains 13 files. What have I done wrong?

Thank you!

Cheers,
Rodrigo[/url]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75371#75371







More information about the osg-users mailing list