Updates will be applied April 15th at 12pm EDT (UTC-0400). GitLab could be a little slow between 12 - 12:45pm EDT.

Commit 63ee0333 authored by Philip Lowman's avatar Philip Lowman

Fixes version detection using osg/Version on Mac OSX when OSG is installed as a framework

Patch from rpavlik attached to issue #9714
parent c6a4dce3
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment