[Cmake-commits] [cmake-commits] hoffman committed FindOpenSceneGraph.cmake 1.5 1.6

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 16 13:26:02 EDT 2009


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv16576

Modified Files:
	FindOpenSceneGraph.cmake 
Log Message:
Try to fix bug#9714, should not crash when version file is not where it should be...


Index: FindOpenSceneGraph.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindOpenSceneGraph.cmake,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** FindOpenSceneGraph.cmake	28 Sep 2009 15:45:38 -0000	1.5
--- FindOpenSceneGraph.cmake	16 Oct 2009 17:25:59 -0000	1.6
***************
*** 97,107 ****
              "Detected OSG_INCLUDE_DIR = ${OSG_INCLUDE_DIR}")
      endif()
! 
!     file(READ "${OSG_INCLUDE_DIR}/osg/Version" _osg_Version_contents)
  
      string(REGEX MATCH ".*#define OSG_VERSION_MAJOR[ \t]+[0-9]+.*"
!         _osg_old_defines ${_osg_Version_contents})
      string(REGEX MATCH ".*#define OPENSCENEGRAPH_MAJOR_VERSION[ \t]+[0-9]+.*"
!         _osg_new_defines ${_osg_Version_contents})
      if(_osg_old_defines)
          string(REGEX REPLACE ".*#define OSG_VERSION_MAJOR[ \t]+([0-9]+).*"
--- 97,110 ----
              "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)
!     else()
!       set(_osg_Version_contents "unknown")
!     endif()
  
      string(REGEX MATCH ".*#define OSG_VERSION_MAJOR[ \t]+[0-9]+.*"
!         _osg_old_defines "${_osg_Version_contents}")
      string(REGEX MATCH ".*#define OPENSCENEGRAPH_MAJOR_VERSION[ \t]+[0-9]+.*"
!         _osg_new_defines "${_osg_Version_contents}")
      if(_osg_old_defines)
          string(REGEX REPLACE ".*#define OSG_VERSION_MAJOR[ \t]+([0-9]+).*"



More information about the Cmake-commits mailing list