Hi J-S,

You're right about using ccmake.  I should get it installed on my Linux box.
(It already is on my Mac.)  I always head for the wrong .txt file to edit.

Thanks for sharing your experiences with out-of-source building.  I'm not
so sure Mac is such a different beast or if the out-of-source problems
I've had are rare.  Maybe osgviewerQT is the different beast.

Because of way our network is set up we build Windows on a seperate drive,
so it's always been built in-source.  We have several flavors of Linux,
Mac, and maybe even Solaris (if we get around to it) that I've been trying
to build off the same source directory.

In the last week we jumped from 2.6.0 to 2.7.7, so maybe part of my
problem is in just catching up.

-Don

Jean-Sébastien Guay wrote:
Hi Don,

I think I have found a bunch of problems due to building OSG
exclusively for out-of-source. Specific problems may
be limited to Mac OS X, but I think there is just a basic
failure of out-of-source builds where cmake does not work as
expected.


I have always built out-of-source, be it on Windows or Linux, and have not had as much trouble as you (by a long shot). It always pretty much worked for me. The fact you build on MacOSX is a difference of course, as is the osgviewerQT example (see below).

$ unzip OpenSceneGraph-2.7.7.zip
-- tweaked CMakeLists.txt to turn on examples & remove Mac ppc --


Err, can't you just use ccmake (or the CMake GUI on MacOSX) to tweak the build? Changing the CMakeLists.txt files should never be necessary, the build files should give you the options you need (if they don't, you can suggest other options to add or add them and contribute the changes...). In particular, building the examples is controlled by a variable which you can just turn off or on. Not sure about the PPC stuff...

This ran smoothly until the build of the osgviewerQT executable


This is one difference, I have not built osgviewerQT on Linux before. On Windows it builds fine, but I think Linux would more comparable to MacOSX so I can't help there.

There are several files that are generated by cmake --
include/OpenThreads/Config and include/osg/Config among them. When building OSG with the out-of-source methodology they are written in the out-of-source
directory. This did not pose a problem with building OSG itself, but a
re-build of my application failed when these files were not found. They are
expected to be found under the src/osg/include directories. It's possible
that this problem hasn't showed up until now since I had always done at
least an aborted in-source build - enough to write the Config files for
an arbitrary architecture.


This has been discussed a lot before, check the archives. You have two options:

1. Add the out-of-source build's include directory to your application's include path. 2. Do a make install (make sure your CMAKE_BUILD_PREFIX is set to where you want the binaries+includes to end up) and point your application's include and lib directories there.

I personally find the second option cleaner, I don't like other projects depending on a build directory which I consider to be temporary files that could be deleted at any time. But it's up to preference, up to you.

Hope this helps,

J-S

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to