[Cmake-commits] [cmake-commits] lowman committed FindOpenThreads.cmake 1.3 1.4 Findosg.cmake 1.3 1.4 FindosgDB.cmake 1.3 1.4 FindosgFX.cmake 1.3 1.4 FindosgGA.cmake 1.3 1.4 FindosgIntrospection.cmake 1.3 1.4 FindosgManipulator.cmake 1.3 1.4 FindosgParticle.cmake 1.3 1.4 FindosgProducer.cmake 1.3 1.4 FindosgShadow.cmake 1.3 1.4 FindosgSim.cmake 1.3 1.4 FindosgTerrain.cmake 1.3 1.4 FindosgText.cmake 1.3 1.4 FindosgUtil.cmake 1.3 1.4 FindosgViewer.cmake 1.3 1.4 FindosgAnimation.cmake NONE 1.1 FindosgVolume.cmake NONE 1.1 FindosgWidget.cmake NONE 1.1 Findosg_functions.cmake NONE 1.1

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Jan 19 13:33:38 EST 2009


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

Modified Files:
	FindOpenThreads.cmake Findosg.cmake FindosgDB.cmake 
	FindosgFX.cmake FindosgGA.cmake FindosgIntrospection.cmake 
	FindosgManipulator.cmake FindosgParticle.cmake 
	FindosgProducer.cmake FindosgShadow.cmake FindosgSim.cmake 
	FindosgTerrain.cmake FindosgText.cmake FindosgUtil.cmake 
	FindosgViewer.cmake 
Added Files:
	FindosgAnimation.cmake FindosgVolume.cmake FindosgWidget.cmake 
	Findosg_functions.cmake 
Log Message:
BUG: Fixed Issue #7331 Bugs in Findosg*.cmake.  Also added OPENTHREADS_LIBRARIES.


Index: FindosgShadow.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgShadow.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgShadow.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgShadow.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgShadow
  # This module defines
! # OSGSHADOW_LIBRARY
! # OSGSHADOW_FOUND, if false, do not try to link to osgShadow
! # OSGSHADOW_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgShadow
  # This module defines
! #
! # OSGSHADOW_FOUND - Was osgShadow found?
! # OSGSHADOW_INCLUDE_DIR - Where to find the headers
! # OSGSHADOW_LIBRARIES - The libraries to link for osgShadow (use this)
! #
! # OSGSHADOW_LIBRARY - The osgShadow library
! # OSGSHADOW_LIBRARY_DEBUG - The osgShadow debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgShadow/ShadowTexture>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGSHADOW_INCLUDE_DIR osgShadow/ShadowTexture
!   HINTS
!   $ENV{OSGSHADOW_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGSHADOW_LIBRARY 
!   NAMES osgShadow
!   HINTS
!   $ENV{OSGSHADOW_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGSHADOW_FOUND "NO")
! IF(OSGSHADOW_LIBRARY AND OSGSHADOW_INCLUDE_DIR)
!   SET(OSGSHADOW_FOUND "YES")
! ENDIF(OSGSHADOW_LIBRARY AND OSGSHADOW_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgShadow/ShadowTexture>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGSHADOW osgShadow/ShadowTexture)
! OSG_FIND_LIBRARY(OSGSHADOW osgShadow)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGSHADOW DEFAULT_MSG
+     OSGSHADOW_LIBRARY OSGSHADOW_INCLUDE_DIR)

--- NEW FILE: Findosg_functions.cmake ---
#
# This CMake file contains two macros to assist with searching for OSG
# libraries and nodekits.
#

#
# OSG_FIND_PATH
#
function(OSG_FIND_PATH module header)
   string(TOUPPER ${module} module_uc)

   # Try the user's environment request before anything else.
   find_path(${module_uc}_INCLUDE_DIR ${header}
       HINTS
            $ENV{${module_uc}_DIR}
            $ENV{OSG_DIR}
            $ENV{OSGDIR}
       PATH_SUFFIXES include
       PATHS
            ~/Library/Frameworks
            /Library/Frameworks
            /sw # Fink
            /opt/local # DarwinPorts
            /opt/csw # Blastwave
            /opt
            [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
            [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
   )
endfunction(OSG_FIND_PATH module header)


#
# OSG_FIND_LIBRARY
#
function(OSG_FIND_LIBRARY module library)
   string(TOUPPER ${module} module_uc)

   find_library(${module_uc}_LIBRARY
       NAMES ${library}
       HINTS
            $ENV{${module_uc}_DIR}
            $ENV{OSG_DIR}
            $ENV{OSGDIR}
       PATH_SUFFIXES lib64 lib
       PATHS
            ~/Library/Frameworks
            /Library/Frameworks
            /usr/local
            /usr
            /sw # Fink
            /opt/local # DarwinPorts
            /opt/csw # Blastwave
            /opt
            [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
   )

   find_library(${module_uc}_LIBRARY_DEBUG
       NAMES ${library}d
       HINTS
            $ENV{${module_uc}_DIR}
            $ENV{OSG_DIR}
            $ENV{OSGDIR}
       PATH_SUFFIXES lib64 lib
       PATHS
            ~/Library/Frameworks
            /Library/Frameworks
            /usr/local
            /usr
            /sw # Fink
            /opt/local # DarwinPorts
            /opt/csw # Blastwave
            /opt
            [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
    )

   if(NOT ${module_uc}_LIBRARY_DEBUG)
      # They don't have a debug library
      set(${module_uc}_LIBRARY_DEBUG ${${module_uc}_LIBRARY} PARENT_SCOPE)
      set(${module_uc}_LIBRARIES ${${module_uc}_LIBRARY} PARENT_SCOPE)
   else()
      # They really have a FOO_LIBRARY_DEBUG
      set(${module_uc}_LIBRARIES 
          optimized ${${module_uc}_LIBRARY}
          debug ${${module_uc}_LIBRARY_DEBUG}
          PARENT_SCOPE
      )
   endif()


endfunction(OSG_FIND_LIBRARY module library)

Index: FindosgProducer.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgProducer.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgProducer.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgProducer.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgProducer
  # This module defines
! # OSGPRODUCER_LIBRARY
! # OSGPRODUCER_FOUND, if false, do not try to link to osgProducer
! # OSGPRODUCER_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgProducer
  # This module defines
! #
! # OSGPRODUCER_FOUND - Was osgProducer found?
! # OSGPRODUCER_INCLUDE_DIR - Where to find the headers
! # OSGPRODUCER_LIBRARIES - The libraries to link for osgProducer (use this)
! #
! # OSGPRODUCER_LIBRARY - The osgProducer library
! # OSGPRODUCER_LIBRARY_DEBUG - The osgProducer debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgProducer/OsgSceneHandler>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGPRODUCER_INCLUDE_DIR osgProducer/OsgSceneHandler
!   HINTS
!   $ENV{OSGPRODUCER_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGPRODUCER_LIBRARY 
!   NAMES osgProducer
!   HINTS
!   $ENV{OSGPRODUCER_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGPRODUCER_FOUND "NO")
! IF(OSGPRODUCER_LIBRARY AND OSGPRODUCER_INCLUDE_DIR)
!   SET(OSGPRODUCER_FOUND "YES")
! ENDIF(OSGPRODUCER_LIBRARY AND OSGPRODUCER_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgProducer/OsgSceneHandler>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGPRODUCER osgProducer/OsgSceneHandler)
! OSG_FIND_LIBRARY(OSGPRODUCER osgProducer)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGPRODUCER DEFAULT_MSG
+     OSGPRODUCER_LIBRARY OSGPRODUCER_INCLUDE_DIR)

Index: FindosgParticle.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgParticle.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgParticle.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgParticle.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgParticle
  # This module defines
! # OSGPARTICLE_LIBRARY
! # OSGPARTICLE_FOUND, if false, do not try to link to osgParticle
! # OSGPARTICLE_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgParticle
  # This module defines
! #
! # OSGPARTICLE_FOUND - Was osgParticle found?
! # OSGPARTICLE_INCLUDE_DIR - Where to find the headers
! # OSGPARTICLE_LIBRARIES - The libraries to link for osgParticle (use this)
! #
! # OSGPARTICLE_LIBRARY - The osgParticle library
! # OSGPARTICLE_LIBRARY_DEBUG - The osgParticle debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgParticle/FireEffect>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGPARTICLE_INCLUDE_DIR osgParticle/FireEffect
!   HINTS
!   $ENV{OSGPARTICLE_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGPARTICLE_LIBRARY 
!   NAMES osgParticle
!   HINTS
!   $ENV{OSGPARTICLE_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGPARTICLE_FOUND "NO")
! IF(OSGPARTICLE_LIBRARY AND OSGPARTICLE_INCLUDE_DIR)
!   SET(OSGPARTICLE_FOUND "YES")
! ENDIF(OSGPARTICLE_LIBRARY AND OSGPARTICLE_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgParticle/FireEffect>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGPARTICLE osgParticle/FireEffect)
! OSG_FIND_LIBRARY(OSGPARTICLE osgParticle)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGPARTICLE DEFAULT_MSG
+     OSGPARTICLE_LIBRARY OSGPARTICLE_INCLUDE_DIR)

Index: FindosgDB.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgDB.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgDB.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgDB.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgDB
  # This module defines
! # OSGDB_LIBRARY
! # OSGDB_FOUND, if false, do not try to link to osgDB
! # OSGDB_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgDB
  # This module defines
! #
! # OSGDB_FOUND - Was osgDB found?
! # OSGDB_INCLUDE_DIR - Where to find the headers
! # OSGDB_LIBRARIES - The libraries to link against for the osgDB (use this)
! #
! # OSGDB_LIBRARY - The osgDB library
! # OSGDB_LIBRARY_DEBUG - The osgDB debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgDB/DatabasePager>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGDB_INCLUDE_DIR osgDB/DatabasePager
!   HINTS
!   $ENV{OSGDB_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGDB_LIBRARY 
!   NAMES osgDB
!   HINTS
!   $ENV{OSGDB_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGDB_FOUND "NO")
! IF(OSGDB_LIBRARY AND OSGDB_INCLUDE_DIR)
!   SET(OSGDB_FOUND "YES")
! ENDIF(OSGDB_LIBRARY AND OSGDB_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgDB/DatabasePager>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGDB osgDB/DatabasePager)
! OSG_FIND_LIBRARY(OSGDB osgDB)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGDB DEFAULT_MSG
+     OSGDB_LIBRARY OSGDB_INCLUDE_DIR)

Index: Findosg.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Findosg.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** Findosg.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- Findosg.cmake	19 Jan 2009 18:33:35 -0000	1.4
***************
*** 12,18 ****
  # Locate osg
  # This module defines
! # OSG_LIBRARY
! # OSG_FOUND, if false, do not try to link to osg
! # OSG_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osg
  # This module defines
! #
! # OSG_FOUND - Was the Osg found?
! # OSG_INCLUDE_DIR - Where to find the headers
! # OSG_LIBRARIES - The libraries to link against for the OSG (use this)
! #
! # OSG_LIBRARY - The OSG library
! # OSG_LIBRARY_DEBUG - The OSG debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,68 ****
  # #include <osgUtil/SceneView>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSG_INCLUDE_DIR osg/PositionAttitudeTransform
!   HINTS
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSG_LIBRARY 
!   NAMES osg
!   HINTS
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSG_FOUND "NO")
! IF(OSG_LIBRARY AND OSG_INCLUDE_DIR)
!   SET(OSG_FOUND "YES")
! ENDIF(OSG_LIBRARY AND OSG_INCLUDE_DIR)
  
--- 30,37 ----
  # #include <osgUtil/SceneView>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSG osg/PositionAttitudeTransform)
! OSG_FIND_LIBRARY(OSG osg)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSG DEFAULT_MSG OSG_LIBRARY OSG_INCLUDE_DIR)

Index: FindosgTerrain.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgTerrain.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgTerrain.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgTerrain.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgTerrain
  # This module defines
! # OSGTERRAIN_LIBRARY
! # OSGTERRAIN_FOUND, if false, do not try to link to osgTerrain
! # OSGTERRAIN_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgTerrain
  # This module defines
! #
! # OSGTERRAIN_FOUND - Was osgTerrain found?
! # OSGTERRAIN_INCLUDE_DIR - Where to find the headers
! # OSGTERRAIN_LIBRARIES - The libraries to link for osgTerrain (use this)
! #
! # OSGTERRAIN_LIBRARY - The osgTerrain library
! # OSGTERRAIN_LIBRARY_DEBUG - The osgTerrain debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgTerrain/Terrain>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGTERRAIN_INCLUDE_DIR osgTerrain/Terrain
!   HINTS
!   $ENV{OSGTERRAIN_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGTERRAIN_LIBRARY 
!   NAMES osgTerrain
!   HINTS
!   $ENV{OSGTERRAIN_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGTERRAIN_FOUND "NO")
! IF(OSGTERRAIN_LIBRARY AND OSGTERRAIN_INCLUDE_DIR)
!   SET(OSGTERRAIN_FOUND "YES")
! ENDIF(OSGTERRAIN_LIBRARY AND OSGTERRAIN_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgTerrain/Terrain>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGTERRAIN osgTerrain/Terrain)
! OSG_FIND_LIBRARY(OSGTERRAIN osgTerrain)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGTERRAIN DEFAULT_MSG
+     OSGTERRAIN_LIBRARY OSGTERRAIN_INCLUDE_DIR)

Index: FindosgFX.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgFX.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgFX.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgFX.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgFX
  # This module defines
! # OSGFX_LIBRARY
! # OSGFX_FOUND, if false, do not try to link to osgFX
! # OSGFX_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgFX
  # This module defines
! #
! # OSGFX_FOUND - Was osgFX found?
! # OSGFX_INCLUDE_DIR - Where to find the headers
! # OSGFX_LIBRARIES - The libraries to link against for the osgFX (use this)
! #
! # OSGFX_LIBRARY - The osgFX library
! # OSGFX_LIBRARY_DEBUG - The osgFX debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgFX/BumpMapping>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGFX_INCLUDE_DIR osgFX/BumpMapping
!   HINTS
!   $ENV{OSGFX_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGFX_LIBRARY 
!   NAMES osgFX
!   HINTS
!   $ENV{OSGFX_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGFX_FOUND "NO")
! IF(OSGFX_LIBRARY AND OSGFX_INCLUDE_DIR)
!   SET(OSGFX_FOUND "YES")
! ENDIF(OSGFX_LIBRARY AND OSGFX_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgFX/BumpMapping>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGFX osgFX/BumpMapping)
! OSG_FIND_LIBRARY(OSGFX osgFX)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGFX DEFAULT_MSG
+     OSGFX_LIBRARY OSGFX_INCLUDE_DIR)

Index: FindosgViewer.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgViewer.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgViewer.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgViewer.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgViewer
  # This module defines
! # OSGVIEWER_LIBRARY
! # OSGVIEWER_FOUND, if false, do not try to link to osgViewer
! # OSGVIEWER_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgViewer
  # This module defines
! #
! # OSGVIEWER_FOUND - Was osgViewer found?
! # OSGVIEWER_INCLUDE_DIR - Where to find the headers
! # OSGVIEWER_LIBRARIES - The libraries to link for osgViewer (use this)
! #
! # OSGVIEWER_LIBRARY - The osgViewer library
! # OSGVIEWER_LIBRARY_DEBUG - The osgViewer debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgViewer/Viewer>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGVIEWER_INCLUDE_DIR osgViewer/Viewer
!   HINTS
!   $ENV{OSGVIEWER_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGVIEWER_LIBRARY 
!   NAMES osgViewer
!   HINTS
!   $ENV{OSGVIEWER_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGVIEWER_FOUND "NO")
! IF(OSGVIEWER_LIBRARY AND OSGVIEWER_INCLUDE_DIR)
!   SET(OSGVIEWER_FOUND "YES")
! ENDIF(OSGVIEWER_LIBRARY AND OSGVIEWER_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgViewer/Viewer>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGVIEWER osgViewer/Viewer)
! OSG_FIND_LIBRARY(OSGVIEWER osgViewer)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGVIEWER DEFAULT_MSG
+     OSGVIEWER_LIBRARY OSGVIEWER_INCLUDE_DIR)

Index: FindosgGA.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgGA.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgGA.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgGA.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgGA
  # This module defines
! # OSGGA_LIBRARY
! # OSGGA_FOUND, if false, do not try to link to osgGA
! # OSGGA_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgGA
  # This module defines
! #
! # OSGGA_FOUND - Was osgGA found?
! # OSGGA_INCLUDE_DIR - Where to find the headers
! # OSGGA_LIBRARIES - The libraries to link against for the osgGA (use this)
! #
! # OSGGA_LIBRARY - The osgGA library
! # OSGGA_LIBRARY_DEBUG - The osgGA debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgGA/FlightManipulator>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGGA_INCLUDE_DIR osgGA/FlightManipulator
!   HINTS
!   $ENV{OSGGA_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGGA_LIBRARY 
!   NAMES osgGA
!   HINTS
!   $ENV{OSGGA_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGGA_FOUND "NO")
! IF(OSGGA_LIBRARY AND OSGGA_INCLUDE_DIR)
!   SET(OSGGA_FOUND "YES")
! ENDIF(OSGGA_LIBRARY AND OSGGA_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgGA/FlightManipulator>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGGA osgGA/FlightManipulator)
! OSG_FIND_LIBRARY(OSGGA osgGA)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGGA DEFAULT_MSG
+     OSGGA_LIBRARY OSGGA_INCLUDE_DIR)

Index: FindosgText.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgText.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgText.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgText.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgText
  # This module defines
! # OSGTEXT_LIBRARY
! # OSGTEXT_FOUND, if false, do not try to link to osgText
! # OSGTEXT_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgText
  # This module defines
! #
! # OSGTEXT_FOUND - Was osgText found?
! # OSGTEXT_INCLUDE_DIR - Where to find the headers
! # OSGTEXT_LIBRARIES - The libraries to link for osgText (use this)
! #
! # OSGTEXT_LIBRARY - The osgText library
! # OSGTEXT_LIBRARY_DEBUG - The osgText debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgText/Text>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGTEXT_INCLUDE_DIR osgText/Text
!   HINTS
!   $ENV{OSGTEXT_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGTEXT_LIBRARY 
!   NAMES osgText
!   HINTS
!   $ENV{OSGTEXT_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGTEXT_FOUND "NO")
! IF(OSGTEXT_LIBRARY AND OSGTEXT_INCLUDE_DIR)
!   SET(OSGTEXT_FOUND "YES")
! ENDIF(OSGTEXT_LIBRARY AND OSGTEXT_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgText/Text>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGTEXT osgText/Text)
! OSG_FIND_LIBRARY(OSGTEXT osgText)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGTEXT DEFAULT_MSG
+     OSGTEXT_LIBRARY OSGTEXT_INCLUDE_DIR)

--- NEW FILE: FindosgVolume.cmake ---
# This is part of the Findosg* suite used to find OpenSceneGraph components.
# Each component is separate and you must opt in to each module. You must 
# also opt into OpenGL and OpenThreads (and Producer if needed) as these 
# modules won't do it for you. This is to allow you control over your own 
# system piece by piece in case you need to opt out of certain components
# or change the Find behavior for a particular module (perhaps because the
# default FindOpenGL.cmake module doesn't work with your system as an
# example).
# If you want to use a more convenient module that includes everything,
# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
# 
# Locate osgVolume
# This module defines
#
# OSGVOLUME_FOUND - Was osgVolume found?
# OSGVOLUME_INCLUDE_DIR - Where to find the headers
# OSGVOLUME_LIBRARIES - The libraries to link for osgVolume (use this)
#
# OSGVOLUME_LIBRARY - The osgVolume library
# OSGVOLUME_LIBRARY_DEBUG - The osgVolume debug library
#
# $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR
# used in building osg.
#
# Created by Eric Wing.

# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgVolume/Volume>

include(Findosg_functions)
OSG_FIND_PATH   (OSGVOLUME osgVolume/Volume)
OSG_FIND_LIBRARY(OSGVOLUME osgVolume)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGVOLUME DEFAULT_MSG
    OSGVOLUME_LIBRARY OSGVOLUME_INCLUDE_DIR)

Index: FindosgManipulator.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgManipulator.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgManipulator.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgManipulator.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgManipulator
  # This module defines
! # OSG_LIBRARY
! # OSGMANIPULATOR_FOUND, if false, do not try to link to osgManipulator
! # OSGMANIPULATOR_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgManipulator
  # This module defines
! #
! # OSGMANIPULATOR_FOUND - Was osgManipulator found?
! # OSGMANIPULATOR_INCLUDE_DIR - Where to find the headers
! # OSGMANIPULATOR_LIBRARIES - The libraries to link for osgManipulator (use this)
! #
! # OSGMANIPULATOR_LIBRARY - The osgManipulator library
! # OSGMANIPULATOR_LIBRARY_DEBUG - The osgManipulator debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgManipulator/TrackballDragger>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGMANIPULATOR_INCLUDE_DIR osgManipulator/TrackballDragger
!   HINTS
!   $ENV{OSGMANIPULATOR_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGMANIPULATOR_LIBRARY 
!   NAMES osgManipulator
!   HINTS
!   $ENV{OSGMANIPULATOR_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGMANIPULATOR_FOUND "NO")
! IF(OSGMANIPULATOR_LIBRARY AND OSGMANIPULATOR_INCLUDE_DIR)
!   SET(OSGMANIPULATOR_FOUND "YES")
! ENDIF(OSGMANIPULATOR_LIBRARY AND OSGMANIPULATOR_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgManipulator/TrackballDragger>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGMANIPULATOR osgManipulator/TrackballDragger)
! OSG_FIND_LIBRARY(OSGMANIPULATOR osgManipulator)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGMANIPULATOR DEFAULT_MSG
+     OSGMANIPULATOR_LIBRARY OSGMANIPULATOR_INCLUDE_DIR)

Index: FindosgSim.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgSim.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgSim.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgSim.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgSim
  # This module defines
! # OSGSIM_LIBRARY
! # OSGSIM_FOUND, if false, do not try to link to osgSim
! # OSGSIM_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgSim
  # This module defines
! #
! # OSGSIM_FOUND - Was osgSim found?
! # OSGSIM_INCLUDE_DIR - Where to find the headers
! # OSGSIM_LIBRARIES - The libraries to link for osgSim (use this)
! #
! # OSGSIM_LIBRARY - The osgSim library
! # OSGSIM_LIBRARY_DEBUG - The osgSim debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgSim/ImpostorSprite>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGSIM_INCLUDE_DIR osgSim/ImpostorSprite
!   HINTS
!   $ENV{OSGSIM_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGSIM_LIBRARY 
!   NAMES osgSim
!   HINTS
!   $ENV{OSGSIM_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGSIM_FOUND "NO")
! IF(OSGSIM_LIBRARY AND OSGSIM_INCLUDE_DIR)
!   SET(OSGSIM_FOUND "YES")
! ENDIF(OSGSIM_LIBRARY AND OSGSIM_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgSim/ImpostorSprite>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGSIM osgSim/ImpostorSprite)
! OSG_FIND_LIBRARY(OSGSIM osgSim)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGSIM DEFAULT_MSG
+     OSGSIM_LIBRARY OSGSIM_INCLUDE_DIR)

--- NEW FILE: FindosgWidget.cmake ---
# This is part of the Findosg* suite used to find OpenSceneGraph components.
# Each component is separate and you must opt in to each module. You must 
# also opt into OpenGL and OpenThreads (and Producer if needed) as these 
# modules won't do it for you. This is to allow you control over your own 
# system piece by piece in case you need to opt out of certain components
# or change the Find behavior for a particular module (perhaps because the
# default FindOpenGL.cmake module doesn't work with your system as an
# example).
# If you want to use a more convenient module that includes everything,
# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
# 
# Locate osgWidget
# This module defines
#
# OSGWIDGET_FOUND - Was osgWidget found?
# OSGWIDGET_INCLUDE_DIR - Where to find the headers
# OSGWIDGET_LIBRARIES - The libraries to link for osgWidget (use this)
#
# OSGWIDGET_LIBRARY - The osgWidget library
# OSGWIDGET_LIBRARY_DEBUG - The osgWidget debug library
#
# $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR
# used in building osg.
#
# FindosgWidget.cmake tweaked from Findosg* suite as created by Eric Wing.

# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgWidget/Widget>

include(Findosg_functions)
OSG_FIND_PATH   (OSGWIDGET osgWidget/Widget)
OSG_FIND_LIBRARY(OSGWIDGET osgWidget)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGWIDGET DEFAULT_MSG
    OSGWIDGET_LIBRARY OSGWIDGET_INCLUDE_DIR)

--- NEW FILE: FindosgAnimation.cmake ---
# This is part of the Findosg* suite used to find OpenSceneGraph components.
# Each component is separate and you must opt in to each module. You must 
# also opt into OpenGL and OpenThreads (and Producer if needed) as these 
# modules won't do it for you. This is to allow you control over your own 
# system piece by piece in case you need to opt out of certain components
# or change the Find behavior for a particular module (perhaps because the
# default FindOpenGL.cmake module doesn't work with your system as an
# example).
# If you want to use a more convenient module that includes everything,
# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
# 
# Locate osgAnimation
# This module defines
#
# OSGANIMATION_FOUND - Was osgAnimation found?
# OSGANIMATION_INCLUDE_DIR - Where to find the headers
# OSGANIMATION_LIBRARIES - The libraries to link against for the OSG (use this)
#
# OSGANIMATION_LIBRARY - The OSG library
# OSGANIMATION_LIBRARY_DEBUG - The OSG debug library
#
# $OSGDIR is an environment variable that would
# correspond to the ./configure --prefix=$OSGDIR
# used in building osg.
#
# Created by Eric Wing.

# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgAnimation/Animation>

include(Findosg_functions)
OSG_FIND_PATH   (OSGANIMATION osgAnimation/Animation)
OSG_FIND_LIBRARY(OSGANIMATION osgAnimation)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGANIMATION DEFAULT_MSG
    OSGANIMATION_LIBRARY OSGANIMATION_INCLUDE_DIR)

Index: FindOpenThreads.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindOpenThreads.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindOpenThreads.cmake	9 Jun 2008 20:04:05 -0000	1.3
--- FindOpenThreads.cmake	19 Jan 2009 18:33:35 -0000	1.4
***************
*** 39,43 ****
  # Explicit -DVAR=value arguments should still be able to override everything.
  
! FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
      HINTS
      $ENV{OPENTHREADS_INCLUDE_DIR}
--- 39,43 ----
  # Explicit -DVAR=value arguments should still be able to override everything.
  
! find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
      HINTS
      $ENV{OPENTHREADS_INCLUDE_DIR}
***************
*** 63,67 ****
  
  
! FIND_LIBRARY(OPENTHREADS_LIBRARY 
      NAMES OpenThreads OpenThreadsWin32 
      HINTS
--- 63,67 ----
  
  
! find_library(OPENTHREADS_LIBRARY 
      NAMES OpenThreads OpenThreadsWin32 
      HINTS
***************
*** 96,101 ****
  )
  
! 
! FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG 
      NAMES OpenThreadsd OpenThreadsWin32d
      HINTS
--- 96,100 ----
  )
  
! find_library(OPENTHREADS_LIBRARY_DEBUG 
      NAMES OpenThreadsd OpenThreadsWin32d
      HINTS
***************
*** 129,145 ****
  )
  
  
! IF(OPENTHREADS_LIBRARY)
!   IF(NOT OPENTHREADS_LIBRARY_DEBUG)
!       #MESSAGE("-- Warning Debug OpenThreads not found, using: ${OPENTHREADS_LIBRARY}")
!       #SET(OPENTHREADS_LIBRARY_DEBUG "${OPENTHREADS_LIBRARY}")
!       SET(OPENTHREADS_LIBRARY_DEBUG "${OPENTHREADS_LIBRARY}" CACHE FILEPATH "Debug version of OpenThreads Library (use regular version if not available)" FORCE)
!   ENDIF(NOT OPENTHREADS_LIBRARY_DEBUG)
! ENDIF(OPENTHREADS_LIBRARY)
!     
! SET(OPENTHREADS_FOUND "NO")
! IF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY)
!   SET(OPENTHREADS_FOUND "YES")
!   # MESSAGE("-- Found OpenThreads: "${OPENTHREADS_LIBRARY})
! ENDIF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY)
! 
--- 128,141 ----
  )
  
+ if(OPENTHREADS_LIBRARY_DEBUG)
+     set(OPENTHREADS_LIBRARIES
+         optimized ${OPENTHREADS_LIBRARY}
+         debug ${OPENTHREADS_LIBRARY_DEBUG})
+ else()
+     set(OPENTHREADS_LIBRARY_DEBUG ${OPENTHREADS_LIBRARY})
+     set(OPENTHREADS_LIBRARIES ${OPENTHREADS_LIBRARY})
+ endif()
  
! include(FindPackageHandleStandardArgs)
! FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENTHREADS DEFAULT_MSG
!     OPENTHREADS_LIBRARY OPENTHREADS_INCLUDE_DIR)

Index: FindosgUtil.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgUtil.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgUtil.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgUtil.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 12,18 ****
  # Locate osgUtil
  # This module defines
! # OSGUTIL_LIBRARY
! # OSGUTIL_FOUND, if false, do not try to link to osgUtil
! # OSGUTIL_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 12,22 ----
  # Locate osgUtil
  # This module defines
! #
! # OSGUTIL_FOUND - Was osgUtil found?
! # OSGUTIL_INCLUDE_DIR - Where to find the headers
! # OSGUTIL_LIBRARIES - The libraries to link for osgUtil (use this)
! #
! # OSGUTIL_LIBRARY - The osgUtil library
! # OSGUTIL_LIBRARY_DEBUG - The osgUtil debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgUtil/SceneView>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGUTIL_INCLUDE_DIR osgUtil/SceneView
!   HINTS
!   $ENV{OSGUTIL_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGUTIL_LIBRARY 
!   NAMES osgUtil
!   HINTS
!   $ENV{OSGUTIL_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGUTIL_FOUND "NO")
! IF(OSGUTIL_LIBRARY AND OSGUTIL_INCLUDE_DIR)
!   SET(OSGUTIL_FOUND "YES")
! ENDIF(OSGUTIL_LIBRARY AND OSGUTIL_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgUtil/SceneView>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGUTIL osgUtil/SceneView)
! OSG_FIND_LIBRARY(OSGUTIL osgUtil)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGUTIL DEFAULT_MSG
+     OSGUTIL_LIBRARY OSGUTIL_INCLUDE_DIR)

Index: FindosgIntrospection.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindosgIntrospection.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** FindosgIntrospection.cmake	9 Jun 2008 20:04:06 -0000	1.3
--- FindosgIntrospection.cmake	19 Jan 2009 18:33:36 -0000	1.4
***************
*** 10,18 ****
  # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
  # 
! # Locate osgIntrospection
  # This module defines
! # OSGINTROSPECTION_LIBRARY
! # OSGINTROSPECTION_FOUND, if false, do not try to link to osgIntrospection
! # OSGINTROSPECTION_INCLUDE_DIR, where to find the headers
  #
  # $OSGDIR is an environment variable that would
--- 10,22 ----
  # use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules.
  # 
! # Locate osgINTROSPECTION
  # This module defines
! #
! # OSGINTROSPECTION_FOUND - Was osgIntrospection found?
! # OSGINTROSPECTION_INCLUDE_DIR - Where to find the headers
! # OSGINTROSPECTION_LIBRARIES - The libraries to link for osgIntrospection (use this)
! #
! # OSGINTROSPECTION_LIBRARY - The osgIntrospection library
! # OSGINTROSPECTION_LIBRARY_DEBUG - The osgIntrospection debug library
  #
  # $OSGDIR is an environment variable that would
***************
*** 26,70 ****
  # #include <osgIntrospection/Reflection>
  
! # Try the user's environment request before anything else.
! FIND_PATH(OSGINTROSPECTION_INCLUDE_DIR osgIntrospection/Reflection
!   HINTS
!   $ENV{OSGINTROSPECTION_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES include
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!     /usr/local
!     /usr
!     /sw # Fink
!     /opt/local # DarwinPorts
!     /opt/csw # Blastwave
!     /opt
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]
!     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
! )
! 
! FIND_LIBRARY(OSGINTROSPECTION_LIBRARY 
!   NAMES osgIntrospection
!   HINTS
!   $ENV{OSGINTROSPECTION_DIR}
!   $ENV{OSG_DIR}
!   $ENV{OSGDIR}
!   PATH_SUFFIXES lib64 lib
!   PATHS
!     ~/Library/Frameworks
!     /Library/Frameworks
!   /usr/local
!   /usr
!   /sw
!   /opt/local
!   /opt/csw
!   /opt
! )
! 
! SET(OSGINTROSPECTION_FOUND "NO")
! IF(OSGINTROSPECTION_LIBRARY AND OSGINTROSPECTION_INCLUDE_DIR)
!   SET(OSGINTROSPECTION_FOUND "YES")
! ENDIF(OSGINTROSPECTION_LIBRARY AND OSGINTROSPECTION_INCLUDE_DIR)
  
--- 30,38 ----
  # #include <osgIntrospection/Reflection>
  
! include(Findosg_functions)
! OSG_FIND_PATH   (OSGINTROSPECTION osgIntrospection/Reflection)
! OSG_FIND_LIBRARY(OSGINTROSPECTION osgIntrospection)
  
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSGINTROSPECTION DEFAULT_MSG
+     OSGINTROSPECTION_LIBRARY OSGINTROSPECTION_INCLUDE_DIR)



More information about the Cmake-commits mailing list