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
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to