View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007331CMakeModulespublic2008-07-13 15:482009-03-16 22:37
ReporterPhilip Lowman 
Assigned ToEric Wing 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in VersionCMake-2-6 
Summary0007331: Bugs in Findosg*.cmake suite
DescriptionTo 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.
TagsNo tags attached.
Attached Filesgz file icon improved_osg_modules.tar.gz [^] (3,840 bytes) 2008-07-13 15:48
gz file icon improved_osg_modules_v2.tar.gz [^] (4,085 bytes) 2008-07-18 23:07
gz file icon improved_osg_modules_v3.tar.gz [^] (4,178 bytes) 2008-07-18 23:24
zip file icon improved_osg_modules_v4.zip [^] (17,863 bytes) 2008-12-11 23:44

 Relationships

  Notes
(0012755)
Philip Lowman (developer)
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 (developer)
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 (developer)
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 (developer)
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 (developer)
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 (developer)
2008-12-16 00:12

ping?
(0014611)
Philip Lowman (developer)
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 (developer)
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 (developer)
2009-03-16 22:37

Resolved in CMake 2.6.3

 Issue History
Date Modified Username Field Change
2008-07-13 15:48 Philip Lowman New Issue
2008-07-13 15:48 Philip Lowman File Added: improved_osg_modules.tar.gz
2008-07-18 23:07 Philip Lowman File Added: improved_osg_modules_v2.tar.gz
2008-07-18 23:07 Philip Lowman Note Added: 0012755
2008-07-18 23:24 Philip Lowman File Added: improved_osg_modules_v3.tar.gz
2008-07-18 23:24 Philip Lowman Note Added: 0012756
2008-08-19 14:20 Bill Hoffman Status new => assigned
2008-08-19 14:20 Bill Hoffman Assigned To => Eric Wing
2008-08-19 22:31 Philip Lowman Note Added: 0013101
2008-08-19 22:35 Philip Lowman Note Added: 0013102
2008-12-11 23:44 Philip Lowman Note Added: 0014332
2008-12-11 23:44 Philip Lowman File Added: improved_osg_modules_v4.zip
2008-12-16 00:12 Philip Lowman Note Added: 0014361
2009-01-10 09:25 Alex Neundorf Category CMake => Modules
2009-01-19 02:23 Philip Lowman Note Added: 0014611
2009-01-19 13:34 Philip Lowman Note Added: 0014617
2009-01-19 13:34 Philip Lowman Status assigned => resolved
2009-01-19 13:34 Philip Lowman Resolution open => fixed
2009-03-16 22:37 Philip Lowman Note Added: 0015710
2009-03-16 22:37 Philip Lowman Status resolved => closed
2009-03-16 22:37 Philip Lowman Fixed in Version => CMake-2-6


Copyright © 2000 - 2018 MantisBT Team