-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindVOpenSceneGraph.cmake
39 lines (30 loc) · 1.4 KB
/
FindVOpenSceneGraph.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# $Id: FindVOpenSG.cmake 22870 2011-08-08 07:10:04Z dr165799 $
include( FindPackageHandleStandardArgs )
include( VistaFindUtils )
#if( NOT VOPENSCENEGRAPH_FOUND )
vista_find_package_root( OpenSceneGraph "include/osg/Camera" )
set( ENV{OSG_ROOT} "${OPENSCENEGRAPH_ROOT_DIR}" )
#set( OpenSceneGraph_DEBUG TRUE )
vista_find_original_package( VOpenSceneGraph OpenSceneGraph )
set( OPENSCENEGRAPH_INCLUDE_DIRS "${OSG_INCLUDE_DIR}" )
set( OPENSCENEGRAPH_LIBRARIES "${OPENSCENEGRAPH_LIBRARIES}" )
set( OPENSCENEGRAPH_LIBRARY_DIRS )
foreach( _COMPONENT ${VOpenSceneGraph_FIND_COMPONENTS} OpenThreads OSG )
string( TOUPPER ${_COMPONENT} _COMP_UPPER )
mark_as_advanced( ${_COMP_UPPER}_INCLUDE_DIR )
mark_as_advanced( ${_COMP_UPPER}_LIBRARY )
mark_as_advanced( ${_COMP_UPPER}_LIBRARY_DEBUG )
endforeach()
foreach( _LIB ${OPENSCENEGRAPH_LIBRARIES} )
get_filename_component( _PATH "${_LIB}" PATH )
get_filename_component( _UP_PATH "${_PATH}" PATH )
if( EXISTS "${_UP_PATH}" )
list( APPEND OPENSCENEGRAPH_LIBRARY_DIRS ${_PATH} )
list( APPEND OPENSCENEGRAPH_LIBRARY_DIRS "${_UP_PATH}/bin" )
endif()
endforeach()
if( OPENSCENEGRAPH_LIBRARY_DIRS )
list( REMOVE_DUPLICATES OPENSCENEGRAPH_LIBRARY_DIRS )
endif()
#endif( NOT VOPENSCENEGRAPH_FOUND )
find_package_handle_standard_args( VOpenSceneGraph "OpenSceneGraph could not be found" OPENSCENEGRAPH_FOUND )