Hi Sukender, On Wed, Nov 25, 2009 at 2:26 PM, Sukender <[email protected]> wrote: > I'm trying to add custom code in some osg plugins (especially 3DS and FBX). I > often have to write things like: > ADD_DEFINITIONS(-DMY_CUSTOM_CODE) in CMakeLists.txt (or #define > MY_CUSTOM_CODE) > > #ifdef MY_CUSTOM_CODE > ... > #endif > > - Can I submit such code (without the #define of course)? > - Do you think there could be a nicer way to isolate custom code? > - And finally, do you think this could be a good idea to have a CMake option > such as "USER_DEFINES"? And then: > FOREACH(CUR_DEFINE ${USER_DEFINES}) > ADD_DEFINITIONS(-D${CUR_DEFINE}) > ENDFOREACH()
The OSG isn't the place for custom code, both for a licensing issues, build issues and maintenance issues. The question really should be how to avoid need for custom code in the core OSG. The use of custom code embedded in the OSG code would suggest that the OSG doesn't support particular features, or isn't extensible enough, or just the that code is tackled in the wrong way. Could you enumerate what custom code you are wanting to put it and why? Perhaps we can figure a way to avoid the need for it completely. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

