[osg-users] [forum] CMake can't find libraries
Nathan Mielcarek
nmielcarek at gmail.com
Mon Jan 7 21:39:13 PST 2019
Hi Rodrigo,
If you run make install from the build directory, all of the includes and
libraries will go to the /usr/local/ directories and then you can set
OSG_ROOT to /usr/local (although I believe it's already on the search
path). It's good practice to not have multiple OSG versions on the search
path as that can lead to potential issues.
-Nathan
On Tue, Jan 1, 2019 at 5:41 PM Rodrigo Dias <rodrigo1406 at gmail.com> wrote:
> 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
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190107/8182d67e/attachment.html>
More information about the osg-users
mailing list