Updated FindOSG.cmake from the version used by Present3D as this is more up to date.
This commit is contained in:
parent
3e8249591b
commit
d277a85537
@ -10,33 +10,36 @@
|
||||
# Created by Robert Osfield.
|
||||
|
||||
FIND_PATH(OSG_INCLUDE_DIR osg/Node
|
||||
${OSG_DIR}/include
|
||||
$ENV{OSG_DIR}/include
|
||||
$ENV{OSG_DIR}
|
||||
$ENV{OSGDIR}/include
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSG_ROOT}/include
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include # Fink
|
||||
/opt/local/include # DarwinPorts
|
||||
/opt/csw/include # Blastwave
|
||||
/opt/include
|
||||
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
|
||||
/usr/freeware/include
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
FIND_PATH(OSG_INCLUDE_DIR osg/Node)
|
||||
|
||||
MACRO(FIND_OSG_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
||||
|
||||
FIND_LIBRARY(${MYLIBRARY}
|
||||
NAMES ${MYLIBRARYNAME}
|
||||
FIND_LIBRARY("${MYLIBRARY}_DEBUG"
|
||||
NAMES "${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}"
|
||||
PATHS
|
||||
${OSG_DIR}/lib/Debug
|
||||
${OSG_DIR}/lib
|
||||
$ENV{OSG_DIR}/lib/debug
|
||||
$ENV{OSG_DIR}/lib
|
||||
$ENV{OSG_DIR}
|
||||
$ENV{OSGDIR}/lib
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSG_ROOT}/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
FIND_LIBRARY("${MYLIBRARY}_DEBUG"
|
||||
NAMES "${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}"
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/lib
|
||||
@ -49,15 +52,54 @@ MACRO(FIND_OSG_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
FIND_LIBRARY(${MYLIBRARY}
|
||||
NAMES ${MYLIBRARYNAME}
|
||||
PATHS
|
||||
${OSG_DIR}/lib/Release
|
||||
${OSG_DIR}/lib
|
||||
$ENV{OSG_DIR}/lib/Release
|
||||
$ENV{OSG_DIR}/lib
|
||||
$ENV{OSG_DIR}
|
||||
$ENV{OSGDIR}/lib
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSG_ROOT}/lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
FIND_LIBRARY(${MYLIBRARY}
|
||||
NAMES ${MYLIBRARYNAME}
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
IF( NOT ${MYLIBRARY}_DEBUG)
|
||||
IF(MYLIBRARY)
|
||||
SET(${MYLIBRARY}_DEBUG ${MYLIBRARY})
|
||||
ENDIF(MYLIBRARY)
|
||||
ENDIF( NOT ${MYLIBRARY}_DEBUG)
|
||||
|
||||
ENDMACRO(FIND_OSG_LIBRARY LIBRARY LIBRARYNAME)
|
||||
|
||||
FIND_OSG_LIBRARY(OSG_LIBRARY osg)
|
||||
FIND_OSG_LIBRARY(OSGGA_LIBRARY osgGA)
|
||||
FIND_OSG_LIBRARY(OSGUTIL_LIBRARY osgUtil)
|
||||
FIND_OSG_LIBRARY(OSGDB_LIBRARY osgDB)
|
||||
FIND_OSG_LIBRARY(OSGTEXT_LIBRARY osgText)
|
||||
FIND_OSG_LIBRARY(OSGWIDGET_LIBRARY osgWidget)
|
||||
FIND_OSG_LIBRARY(OSGTERRAIN_LIBRARY osgTerrain)
|
||||
FIND_OSG_LIBRARY(OSGFX_LIBRARY osgFX)
|
||||
FIND_OSG_LIBRARY(OSGVIEWER_LIBRARY osgViewer)
|
||||
FIND_OSG_LIBRARY(OSGVOLUME_LIBRARY osgVolume)
|
||||
FIND_OSG_LIBRARY(OPENTHREADS_LIBRARY OpenThreads)
|
||||
|
||||
SET(OSG_FOUND "NO")
|
||||
IF(OSG_LIBRARY AND OSG_INCLUDE_DIR)
|
||||
|
Loading…
Reference in New Issue
Block a user