[Cmake-commits] [cmake-commits] lowman committed FindOpenSceneGraph.cmake 1.2 1.3
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Aug 12 21:58:17 EDT 2009
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv1943
Modified Files:
FindOpenSceneGraph.cmake
Log Message:
Improved error output and documentation
* Fixed errant output when version number not found
* Improved error output when REQUIRED is passed
* Improved docs and example
Index: FindOpenSceneGraph.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindOpenSceneGraph.cmake,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** FindOpenSceneGraph.cmake 31 Jan 2009 18:57:48 -0000 1.2
--- FindOpenSceneGraph.cmake 13 Aug 2009 01:58:14 -0000 1.3
***************
*** 1,12 ****
# - Find OpenSceneGraph
# This module searches for the OpenSceneGraph core "osg" library as well as
! # OpenThreads, and whatever additional COMPONENTS that you specify.
# See http://www.openscenegraph.org
#
! # NOTE: If you would like to use this module in your CMAKE_MODULE_PATH instead
! # of requiring CMake >= 2.6.3, you will also need to download
! # FindOpenThreads.cmake, Findosg_functions.cmake, Findosg.cmake, as well as
! # files for any Components you need to call (FindosgDB.cmake,
! # FindosgUtil.cmake, etc.)
#
#==================================
--- 1,11 ----
# - Find OpenSceneGraph
# This module searches for the OpenSceneGraph core "osg" library as well as
! # OpenThreads, and whatever additional COMPONENTS (nodekits) that you specify.
# See http://www.openscenegraph.org
#
! # NOTE: To use this module effectively you must either require CMake >= 2.6.3
! # with cmake_minimum_required(VERSION 2.6.3) or download and place
! # FindOpenThreads.cmake, Findosg_functions.cmake, Findosg.cmake,
! # and Find<foo>.cmake files for whatever nodekits you need.
#
#==================================
***************
*** 41,45 ****
# Example Usage:
#
! # find_package(OpenSceneGraph 2.0.0 COMPONENTS osgDB osgUtil)
# include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
#
--- 40,45 ----
# Example Usage:
#
! # find_package(OpenSceneGraph 2.0.0 REQUIRED osgDB osgUtil)
! # # libOpenThreads & libosg automatically searched
# include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
#
***************
*** 127,131 ****
# Version checking
#
! if(OpenSceneGraph_FIND_VERSION)
if(OpenSceneGraph_FIND_VERSION_EXACT)
if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION})
--- 127,131 ----
# Version checking
#
! if(OpenSceneGraph_FIND_VERSION AND OPENSCENEGRAPH_VERSION)
if(OpenSceneGraph_FIND_VERSION_EXACT)
if(NOT OPENSCENEGRAPH_VERSION VERSION_EQUAL ${OpenSceneGraph_FIND_VERSION})
***************
*** 141,149 ****
endif()
- set(_osg_required)
set(_osg_quiet)
- if(OpenSceneGraph_FIND_REQUIRED)
- set(_osg_required "REQUIRED")
- endif()
if(OpenSceneGraph_FIND_QUIETLY)
set(_osg_quiet "QUIET")
--- 141,145 ----
***************
*** 157,161 ****
"Calling find_package(${_osg_module} ${_osg_required} ${_osg_quiet})")
endif()
! find_package(${_osg_module} ${_osg_required} ${_osg_quiet})
string(TOUPPER ${_osg_module} _osg_module_UC)
--- 153,157 ----
"Calling find_package(${_osg_module} ${_osg_required} ${_osg_quiet})")
endif()
! find_package(${_osg_module} ${_osg_quiet})
string(TOUPPER ${_osg_module} _osg_module_UC)
***************
*** 197,202 ****
endif()
else()
! # If the version was OK, we should hit this case where we can do the
! # typical user notifications
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSceneGraph DEFAULT_MSG OPENSCENEGRAPH_LIBRARIES OPENSCENEGRAPH_INCLUDE_DIR)
--- 193,219 ----
endif()
else()
!
! #
! # Check each module to see if it's found
! #
! if(OpenSceneGraph_FIND_REQUIRED)
! set(_osg_missing_message)
! foreach(_osg_module ${_osg_modules_to_process})
! string(TOUPPER ${_osg_module} _osg_module_UC)
! if(NOT ${_osg_module_UC}_FOUND)
! set(_osg_missing_nodekit_fail true)
! set(_osg_missing_message "${_osg_missing_message} ${_osg_module}")
! endif()
! endforeach()
!
! if(_osg_missing_nodekit_fail)
! message(FATAL_ERROR "ERROR: Missing the following osg "
! "libraries: ${_osg_missing_message}.\n"
! "Consider using CMAKE_PREFIX_PATH or the OSG_DIR "
! "environment variable. See the "
! "${CMAKE_CURRENT_LIST_FILE} for more details.")
! endif()
! endif()
!
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSceneGraph DEFAULT_MSG OPENSCENEGRAPH_LIBRARIES OPENSCENEGRAPH_INCLUDE_DIR)
More information about the Cmake-commits
mailing list