summaryrefslogtreecommitdiff
path: root/Modules/FindOpenSceneGraph.cmake
diff options
context:
space:
mode:
authorPhilip Lowman <philip@yhbt.com>2009-10-20 07:55:48 -0400
committerPhilip Lowman <philip@yhbt.com>2009-10-20 07:55:48 -0400
commit63ee0333cd6d885f14fcf7f7cca537d294e189b6 (patch)
tree060dbd0aa36d13647c65577e385a9a1dea6d1e71 /Modules/FindOpenSceneGraph.cmake
parentc6a4dce3f40a36198c721cb6f4848c26230d5697 (diff)
downloadcmake-63ee0333cd6d885f14fcf7f7cca537d294e189b6.tar.gz
Fixes version detection using osg/Version on Mac OSX when OSG is installed as a framework
Patch from rpavlik attached to issue #9714
Diffstat (limited to 'Modules/FindOpenSceneGraph.cmake')
-rw-r--r--Modules/FindOpenSceneGraph.cmake10
1 files changed, 8 insertions, 2 deletions
diff --git a/Modules/FindOpenSceneGraph.cmake b/Modules/FindOpenSceneGraph.cmake
index b06cba46c5..25cf4ee150 100644
--- a/Modules/FindOpenSceneGraph.cmake
+++ b/Modules/FindOpenSceneGraph.cmake
@@ -96,8 +96,14 @@ if(OSG_INCLUDE_DIR)
message("[ FindOpenSceneGraph.cmake:${CMAKE_CURRENT_LIST_LINE} ] "
"Detected OSG_INCLUDE_DIR = ${OSG_INCLUDE_DIR}")
endif()
- if(EXISTS "${OSG_INCLUDE_DIR}/osg/Version")
- file(READ "${OSG_INCLUDE_DIR}/osg/Version" _osg_Version_contents)
+
+ set(_osg_Version_file "${OSG_INCLUDE_DIR}/osg/Version")
+ if("${OSG_INCLUDE_DIR}" MATCHES "\\.framework$" AND NOT EXISTS "${_osg_Version_file}")
+ set(_osg_Version_file "${OSG_INCLUDE_DIR}/Headers/Version")
+ endif()
+
+ if(EXISTS "${_osg_Version_file}")
+ file(READ "${_osg_Version_file}" _osg_Version_contents)
else()
set(_osg_Version_contents "unknown")
endif()