[osg-users] Build Error on Windows

Robert Osfield robert.osfield at gmail.com
Sun Mar 22 03:50:35 PDT 2009


HI Mark,

I would recommend using CMake 2.6.x under Windows.

Robert.

On Sat, Mar 21, 2009 at 12:55 AM, Mark Sciabica <msciabica at itracs.com>wrote:

> Hello all,
>
> I'd like to report a build error I encountered on Windows using CMake 2.4
> and default CMAKE_INSTALL_PREFIX. The default value for the install prefix
> is "C:/Program Files/OpenSceneGraph" (without the quotes). The space in the
> path appears to confuse CMake when generating the project file for osgDB.
> The problematic CMake source line is:
>
>
> ADD_DEFINITIONS(-DOSG_DEFAULT_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib${LIB_POSTFIX}/${OSG_PLUGINS})
>
> CMake splits this line at the space, creating an output line of
>  "-DOSG_DEFAULT_LIBRARY_PATH=C:/Program" plus an additional compiler option
> of "Files/OpenSceneGraph/lib/osgPlugins-2.8.0". The compiler tries to
> compile this as a file and throws an error. Putting quotes around the string
> for the CMAKE_INSTALL_PREFIX option fixes the problem.
>
> In addition to noting this build problem, I would like to question the
> desirability of storing the install path in the binary. The users of my
> software certainly won't be installing OSG in a fixed path determined at the
> time I compile the software, so best case here is a useless check of a
> nonexistent directory. Worst case is that another build of OSG is in that
> directory with plugins built with incompatible compiler options, leading to
> a crash. I suggest removing this osg default library path or having an
> option to disable it (preferably with disabled being the default).
>
> Regards,
>
> Mark
> _______________________________________________
> 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/20090322/79006f6d/attachment-0003.htm>


More information about the osg-users mailing list