View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013094CMakeModulespublic2012-04-02 06:532013-01-09 14:05
ReporterArnaud Gelas 
Assigned ToPhilip Lowman 
PlatformOSOS Version
Product Version 
Target VersionCMake 2.8.10Fixed in VersionCMake 2.8.10 
Summary0013094: FindOpenSceneGraph requires some environment variables to be set
DescriptionWith this patch it works if variables (OSG_DIR, OSGDIR, OSGROOT) are non environment variables. When dealing with external projects and OpenSceneGraph it is really a must...
TagsNo tags attached.
Attached Filespatch file icon 0001-Variables-such-as-OSG_DIR-OSGDIR-OSGROOT-do-not-need.patch [^] (7,146 bytes) 2012-04-02 06:53 [Show Content]
patch file icon 0001-Add-hint-variables-one-for-FindOpenSceneGraph-one-fo.patch [^] (8,373 bytes) 2012-04-16 10:24 [Show Content]
patch file icon 0001-OSG_DIR-can-now-be-set-by-the-user.patch [^] (3,487 bytes) 2012-06-15 10:09 [Show Content]


Brad King (manager)
2012-04-02 10:00

Any find_* command result that stores a unique cache variable can be told its answer by using -D<cachevar>=val on the command line so these changes are not absolutely required for ExternalProject use cases. Adding extra non-ENV hints to avoid having to specify every library's location is worthwhile though.

How did you construct the list of additional non-ENV names for each case? One hunk results in code of the form

find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread

which does not make any sense. If OPENTHREADS_INCLUDE_DIR is already set then the find command does nothing anyway.

IIUC the reason all the different ENV{} cases are given is to account for various names people might have in their environment. I think for an intentional CMake hint variable we can document just one name and add that to all the HINTS arguments.
Arnaud Gelas (reporter)
2012-04-16 10:25


Thanks for the tip!

Following your advice, I kept only one variable OSG_DIR for all OpenSceneGraph libraries and modules and I have added one for OpenThreads if soneone wants to use OpenThreads alone without OpenSceneGraph.

Brad King (manager)
2012-04-16 10:34

Eric, Philip, as maintainers of the Findosg and FindOpenSceneGraph modules please take a look at 0001-Add-hint-variables-one-for-FindOpenSceneGraph-one-fo.patch.
Arnaud Gelas (reporter)
2012-06-15 02:47


Any chance, these patchs can get reviewed (and get in some time) ?

Brad King (manager)
2012-06-15 09:28

Since the module maintainers have not responded I took a quick look myself. The patches are hard to follow because they reformat some documentation without changing it and also remove trailing whitespace on lines that are not otherwise modified.

The right place for FindOpenSceneGraph.cmake to document OSG_DIR is in the section headed:

 # This module accepts the following variables (note mixed case)

Why is OPENTHREADS_DIR mentioned in the FindOpenSceneGraph docs?

Also please review the appearance of the docs in "cmake --help-module FindOpenSceneGraph". The blank line added between comment blocks ends the documentation and drops the rest.
David Cole (manager)
2012-08-11 21:42

Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
Philip Lowman (developer)
2012-08-18 17:12

I merged in 0001-OSG_DIR-can-now-be-set-by-the-user.patch and tweaked some of the documentation.

In the meantime, you can use CMAKE_PREFIX_PATH to workaround this if you prefer not to set environment variables.

# add OSG's install directory to the CMAKE_PREFIX_PATH

I believe this was the original intent for people who wanted to include the module directly, but an OSG_DIR CMake variable is certainly easier to understand and control (e.g. via cache).
Robert Maynard (manager)
2013-01-09 14:05

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-04-02 06:53 Arnaud Gelas New Issue
2012-04-02 06:53 Arnaud Gelas File Added: 0001-Variables-such-as-OSG_DIR-OSGDIR-OSGROOT-do-not-need.patch
2012-04-02 10:00 Brad King Note Added: 0029035
2012-04-16 10:24 Arnaud Gelas File Added: 0001-Add-hint-variables-one-for-FindOpenSceneGraph-one-fo.patch
2012-04-16 10:25 Arnaud Gelas Note Added: 0029177
2012-04-16 10:34 Brad King Note Added: 0029178
2012-06-15 02:47 Arnaud Gelas Note Added: 0029703
2012-06-15 09:28 Brad King Note Added: 0029705
2012-06-15 10:09 Arnaud Gelas File Added: 0001-OSG_DIR-can-now-be-set-by-the-user.patch
2012-08-11 21:42 David Cole Status new => backlog
2012-08-11 21:42 David Cole Note Added: 0030443
2012-08-18 15:32 Philip Lowman Status backlog => assigned
2012-08-18 15:32 Philip Lowman Assigned To => Philip Lowman
2012-08-18 17:12 Philip Lowman Note Added: 0030703
2012-08-18 17:12 Philip Lowman Severity major => feature
2012-08-18 17:12 Philip Lowman Reproducibility have not tried => always
2012-08-18 17:12 Philip Lowman Status assigned => resolved
2012-08-18 17:12 Philip Lowman Resolution open => fixed
2012-08-18 17:12 Philip Lowman Fixed in Version => CMake 2.8.10
2012-08-18 17:12 Philip Lowman Target Version => CMake 2.8.10
2013-01-09 14:05 Robert Maynard Note Added: 0032075
2013-01-09 14:05 Robert Maynard Status resolved => closed

Copyright © 2000 - 2018 MantisBT Team