Hi Jan, J-S, I was actually thinking about how to fix the debug library issue since pankaj mentioned it, it does appear to be a common request.
I did a quick google and I think it is possible to setup CMake to configure single build types if required. If that is the case, then I think providing a cmake option of release/release+debug builds would be preferable to using a script that automatically places release libs in the place of debug libs. Doing it automatically could easily create confusion should people not notice the release/debug mix in cmake. I'll take a look at it this evening and see if it can be done easily. Jan - cheers for the fix, I must have overlooked that. Regards, Kim. 2009/10/6 Jean-Sébastien Guay <jean-sebastien.g...@cm-labs.com> > Hi Jan, > > Could the CMakeFile.txt be fixed that if no debug version is found cmake >> doesn't fail? I want to build a release (default) and it fails because the >> debug version of OSG is not there - it shouldn't be required for building >> release and/or if not on Windows (you can safely mix debug/release except on >> Windows). Also, on Linux there is usually no "d" suffix for debug versions - >> OSG has a macro to deal with that. >> > > The OSG libraries are found using the Findosg*.cmake that come with CMake. > Looking at Findosg_functions.cmake (in <my CMake install > dir>/share/cmake-2.6/Modules) I see this: > > if(NOT ${module_uc}_LIBRARY_DEBUG) > # They don't have a debug library > set(${module_uc}_LIBRARY_DEBUG ${${module_uc}_LIBRARY} PARENT_SCOPE) > set(${module_uc}_LIBRARIES ${${module_uc}_LIBRARY} PARENT_SCOPE) > else() > # They really have a FOO_LIBRARY_DEBUG > set(${module_uc}_LIBRARIES > optimized ${${module_uc}_LIBRARY} > debug ${${module_uc}_LIBRARY_DEBUG} > PARENT_SCOPE > ) > endif() > > Which if I'm reading right, means that if no debug library was found, it > will set the debug library to the same value as the release library. I think > that should do what you want? > > Maybe check which version of CMake you have, and whether your > Findosg_functions.cmake has this code. > > In any case, tweaking how the OSG libraries are found/used will mean > copying the Findosg*.cmake modules to be local to the project, and tweaking > them there. I'd be hesitant to do that since we then take on the > responsibility of maintaining our copies of them in the future. So if you > can live with manually setting the debug library to the same value as the > release library (which you'll need to do only once because then the values > are cached for the next time you need to run cmake) then that might be > better. > > Or perhaps we can submit a patch to the Findosg*.cmake modules that come > with CMake to add an option to do what you want. If you want you can > investigate this path. > > In any case, I'm not that familiar with CMake so I just read the code and > try to make sense of it, if we want to do something more complicated I'd > consult Philip Lowman who seems to be really comfortable with CMake :-) > > Furthermore, you may want to fix the following to bring osgOcean in line >> with the other plugins/nodekits regarding installation - headers should be >> installed under osgOcean subdir and the shared lib should go into the lib >> not bin subdirectory. >> > > Committed to SVN trunk. Thanks for the patch. > > J-S > -- > ______________________________________________________ > Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com > http://www.cm-labs.com/ > http://whitestar02.webhop.org/ > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org