MantisBT - CMake
View Issue Details
0007331CMakeModulespublic2008-07-13 15:482009-03-16 22:37
Philip Lowman 
Eric Wing 
normalminoralways
closedfixed 
CMake-2-6 
CMake-2-6 
0007331: Bugs in Findosg*.cmake suite
To make the modules more maintainable (in case search paths need to be modified in the future, etc.) I have created function wrappers for the find_path() and find_library() calls and moved the code to Findosg_functions.cmake in the patch below.

There are three bugs in the Findosg* suite currently released as part of CMake 2.6.0:

1. There is no provision for finding debug libraries under MSVC "osgd.lib", "osgViewerd.lib", etc. These debug libraries are always needed when compiling with MSVC and linking a debug executable against the OSG. I've added searches for OSG_LIBRARY_DEBUG, OSGDB_LIBRARY_DEBUG, etc. when compiling with MSVC. When the user is not using MSVC presently OSG_LIBRARY_DEBUG is assigned whatever OSG_LIBRARY is set to. This keeps the cache simpler for platforms that don't require this debug vs. debug, release vs. release linking constraint.

2. The existing modules properly detect header files as installed by the OpenSceneGraph win32 binary releases (this is done via a registry key). The module is missing the registry key search when looking for libraries, however. I have added this registry key to the search path.

3. The modules were not using FindPackageHandleStandardArgs.
No tags attached.
gz improved_osg_modules.tar.gz (3,840) 2008-07-13 15:48
https://public.kitware.com/Bug/file/1595/improved_osg_modules.tar.gz
gz improved_osg_modules_v2.tar.gz (4,085) 2008-07-18 23:07
https://public.kitware.com/Bug/file/1603/improved_osg_modules_v2.tar.gz
gz improved_osg_modules_v3.tar.gz (4,178) 2008-07-18 23:24
https://public.kitware.com/Bug/file/1604/improved_osg_modules_v3.tar.gz
zip improved_osg_modules_v4.zip (17,863) 2008-12-11 23:44
https://public.kitware.com/Bug/file/1911/improved_osg_modules_v4.zip
Issue History
2008-07-13 15:48Philip LowmanNew Issue
2008-07-13 15:48Philip LowmanFile Added: improved_osg_modules.tar.gz
2008-07-18 23:07Philip LowmanFile Added: improved_osg_modules_v2.tar.gz
2008-07-18 23:07Philip LowmanNote Added: 0012755
2008-07-18 23:24Philip LowmanFile Added: improved_osg_modules_v3.tar.gz
2008-07-18 23:24Philip LowmanNote Added: 0012756
2008-08-19 14:20Bill HoffmanStatusnew => assigned
2008-08-19 14:20Bill HoffmanAssigned To => Eric Wing
2008-08-19 22:31Philip LowmanNote Added: 0013101
2008-08-19 22:35Philip LowmanNote Added: 0013102
2008-12-11 23:44Philip LowmanNote Added: 0014332
2008-12-11 23:44Philip LowmanFile Added: improved_osg_modules_v4.zip
2008-12-16 00:12Philip LowmanNote Added: 0014361
2009-01-10 09:25Alex NeundorfCategoryCMake => Modules
2009-01-19 02:23Philip LowmanNote Added: 0014611
2009-01-19 13:34Philip LowmanNote Added: 0014617
2009-01-19 13:34Philip LowmanStatusassigned => resolved
2009-01-19 13:34Philip LowmanResolutionopen => fixed
2009-03-16 22:37Philip LowmanNote Added: 0015710
2009-03-16 22:37Philip LowmanStatusresolved => closed
2009-03-16 22:37Philip LowmanFixed in Version => CMake-2-6

Notes
(0012755)
Philip Lowman   
2008-07-18 23:07   
Uploaded a new version of the modules (v2) with FindosgWidget.cmake for osgWidget which is a new nodekit in the OSG trunk.
(0012756)
Philip Lowman   
2008-07-18 23:24   
Uploaded a new version of the modules (v3) that modifies FindOpenThreads to avoid polluting the CMake cache with OPENTHREADS_LIBRARY_DEBUG unless on MSVC (similar to the rest of the modified OSG modules).
(0013101)
Philip Lowman   
2008-08-19 22:31   
I was working on a better version but ran into a technical issue with CMake I have yet to work out. See http://www.cmake.org/pipermail/cmake/2008-August/023445.html [^]
(0013102)
Philip Lowman   
2008-08-19 22:35   
The issue with what I've provided so far is that it doesn't expose _DEBUG to Linux users who may want those variables (OSG does generate debug libraries with a +d postfix which users may want to take advantage of when linking against an OSG library in an installed prefix).

libosg.so
libosgd.so

I build my app and I may want to link optimized against libosg.so and debug against libosgd.so, or I may not want to do this. I was trying to find a way to make this configurable but haven't come up with a good solution.
(0014332)
Philip Lowman   
2008-12-11 23:44   
The latest uploaded version (v4) exposes _DEBUG in the cache. It also creates a FOO_LIBRARIES for each package that contains the magical optimized / debug directives. It also adds osgAnimation and osgVolume find modules.

This should be completely backwards compatible with the old Find modules.
(0014361)
Philip Lowman   
2008-12-16 00:12   
ping?
(0014611)
Philip Lowman   
2009-01-19 02:23   
Mind if I check these in? I'd like to get them into CMake 2.6.3
(0014617)
Philip Lowman   
2009-01-19 13:34   
Committer: Philip Lowman <philip@yhbt.com>
/cvsroot/CMake/CMake/Modules/FindOpenThreads.cmake,v <-- FindOpenThreads.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/Findosg.cmake,v <-- Findosg.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgDB.cmake,v <-- FindosgDB.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgFX.cmake,v <-- FindosgFX.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgGA.cmake,v <-- FindosgGA.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgIntrospection.cmake,v <-- FindosgIntrospection.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgManipulator.cmake,v <-- FindosgManipulator.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgParticle.cmake,v <-- FindosgParticle.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgProducer.cmake,v <-- FindosgProducer.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgShadow.cmake,v <-- FindosgShadow.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgSim.cmake,v <-- FindosgSim.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgTerrain.cmake,v <-- FindosgTerrain.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgText.cmake,v <-- FindosgText.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgUtil.cmake,v <-- FindosgUtil.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgViewer.cmake,v <-- FindosgViewer.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/FindosgAnimation.cmake,v <-- FindosgAnimation.cmake
initial revision: 1.1
/cvsroot/CMake/CMake/Modules/FindosgVolume.cmake,v <-- FindosgVolume.cmake
initial revision: 1.1
/cvsroot/CMake/CMake/Modules/FindosgWidget.cmake,v <-- FindosgWidget.cmake
initial revision: 1.1
/cvsroot/CMake/CMake/Modules/Findosg_functions.cmake,v <-- Findosg_functions.cmake
initial revision: 1.1
(0015710)
Philip Lowman   
2009-03-16 22:37   
Resolved in CMake 2.6.3