Hi Kim, Jan,

I'll have a look at how this is done in the OSG CMakelists, For the OSG, CMake has always defaulted to a debug&release build configuration under windows, I just presumed that was the norm.

Let's be specific here. There are two separate issues:

1. Whether the CMake scripts ask you for debug libraries or not (and also whether it's an error if the debug libraries are not found)
2. Whether the Release build is the default.

Issue 2 is the simplest:

On Windows, solution files are generated that contain Debug, Release, RelWithDebugInfo and MinSizeRelease configurations. That should continue to be the case. On Linux, you need to specify the configuration you want at CMake-configure-time (CMAKE_BUILD_TYPE). If you don't specify anything, you get Release.

For both OSG and osgOcean, CMake will generate all four build types on Windows, and will let you specify what you want in CMAKE_BUILD_TYPE on Linux and build release by default. So we can dismiss issue 2, it's the same for both OSG and osgOcean.

For issue 1, on *both* Windows and Linux, OSG's CMake will ask you for the path to debug and release versions of your libraries when it makes sense. For example, OSG has fields for both release and debug libraries for COLLADA and Boost. For other libraries it will only ask for release. I'm not sure what the behavior is when it doesn't find the debug versions, but it does ask for them.

In the interest of making things simpler for Linux users, I've made a change to osgOcean's root CMakeLists.txt. If not on Windows, if any of the _DEBUG libraries are empty or not found, it will use the release variant in its place. (I think Linux and MacOS X users will want to do the same thing here)

On Windows that would actually be an error, so CMake will still generate an error if the debug libs are not found. Since the configuration is chosen from the Solution file and not at CMake-configure-time, we have no way of making sure the user will only ever make release builds, so I prefer to err on the side of safety and require users to have debug OSG libraries.

Jan, can you update osgOcean and see if that works for you?

Thanks,

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