I have run into some problems with trying to use osg2-config to get command line options for the linker on Linux, Windows, and Mac OS X. I already fixed one simple issue (see r1767), but there are more complicated problems lingering. First, in the Windows case, dependency libraries such as libpng or libtiff are written into the generated osg2-config in a way that produces incorrect output when using the --libs or --llibs options. While the OpenSG library names are written out to osg2-config without the .lib extension, the dependency library names are written into the script with the .lib extension. When building the linker output, the script adds the .lib extension to everything. This could be fixed by doing some extra work in osg2-config, but it seems better to me to keep osg2-config simple and fix up the process for generating it.
On Linux, the .so extension is correctly stripped from dependency libraries as long as the named shared library actually ends with .so. If it ends with something else (such as .so.2.1 in the case of libcollada14dom), then the --libs output is invalid for what the GNU linker expects. This isn't necessarily a problem with the script since the CMake user can--and probably should--specify the name of the library with the .so extension. I don't know if it is possible for CMake to issue an error or a warning when the user provides input for a library name that will result in invalid output from osg2-config later, but doing so would avoid some hassle for users of osg2-config. On Mac OS X, the .dylib extension is not stripped correctly. It is instead truncated to .dy, an outcome that doesn't make much sense to me. That may just be the result of my lack of familiarity with CMake, however. The bigger problem on Mac OS X concerns the use of frameworks. The process for generating osg2-config is not handling this at all AFAICT. Tweaking osg2-config after it is generated is non-trivial since the expectation from the script is that all library names on Mac OS X can be prefixed with -l in the linker output. The same problem exists for framework paths, a case that requires -F instead of -L. Does anyone have some tips for me on how I might go about fixing up osg2-config and its generation process? I can and will take care of this myself, but I could use a clue or two about how the procedure for generating osg2-config from CMake was devised. There may already be examples available for handling these cases, and I just need some ideas to make good searches. Thanks in advance. -Patrick -- Patrick L. Hartling Senior Software Engineer, Priority 5 http://www.priority5.com/ The information transmitted in this communication is intended only for the person or entity to which it is addressed and contains proprietary material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please destroy any copies, contact the sender and delete the material from any computer. ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
