diff options
author | Philip Lowman <philip@yhbt.com> | 2009-01-31 18:57:48 (GMT) |
---|---|---|
committer | Philip Lowman <philip@yhbt.com> | 2009-01-31 18:57:48 (GMT) |
commit | de70cc194be0f08b37e53d74c4ffb107543b35c1 (patch) | |
tree | 5cad42956155d9c5ab2c379d1450724a46448b81 /Modules/FindOpenSceneGraph.cmake | |
parent | 1897b563d9b2568c9459e631047ed9c6c708e4b6 (diff) | |
download | CMake-de70cc194be0f08b37e53d74c4ffb107543b35c1.zip CMake-de70cc194be0f08b37e53d74c4ffb107543b35c1.tar.gz CMake-de70cc194be0f08b37e53d74c4ffb107543b35c1.tar.bz2 |
BUG: Fixes configure error if you don't specify a version with find_package()
Diffstat (limited to 'Modules/FindOpenSceneGraph.cmake')
-rw-r--r-- | Modules/FindOpenSceneGraph.cmake | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Modules/FindOpenSceneGraph.cmake b/Modules/FindOpenSceneGraph.cmake index 6050c48..7bdd2b2 100644 --- a/Modules/FindOpenSceneGraph.cmake +++ b/Modules/FindOpenSceneGraph.cmake @@ -126,15 +126,17 @@ endif() # # Version checking # -if(OpenSceneGraph_FIND_VERSION_EXACT) - if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION}) - set(_osg_version_not_exact TRUE) - endif() -else() - # version is too low - if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION} AND - NOT OPENSCENEGRAPH_VERSION VERSION_GREATER ${OpenSceneGraph_FIND_VERSION}) - set(_osg_version_not_high_enough TRUE) +if(OpenSceneGraph_FIND_VERSION) + if(OpenSceneGraph_FIND_VERSION_EXACT) + if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION}) + set(_osg_version_not_exact TRUE) + endif() + else() + # version is too low + if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION} AND + NOT OPENSCENEGRAPH_VERSION VERSION_GREATER ${OpenSceneGraph_FIND_VERSION}) + set(_osg_version_not_high_enough TRUE) + endif() endif() endif() |