Merge topic 'FindOpenSceneGraph-pieces-not-found'

b683da3e FindOpenSceneGraph: Do not add unfound OSG libs if not required
This commit is contained in:
Brad King 2014-09-22 09:13:05 -04:00 committed by CMake Topic Stage
commit 2f3985c6a5
1 changed files with 5 additions and 2 deletions

View File

@ -203,8 +203,11 @@ foreach(_osg_module ${_osg_modules_to_process})
find_package(${_osg_module} ${_osg_quiet}) find_package(${_osg_module} ${_osg_quiet})
string(TOUPPER ${_osg_module} _osg_module_UC) string(TOUPPER ${_osg_module} _osg_module_UC)
# append to list if module was found OR is required
if( ${_osg_module_UC}_FOUND OR OpenSceneGraph_FIND_REQUIRED )
list(APPEND OPENSCENEGRAPH_INCLUDE_DIR ${${_osg_module_UC}_INCLUDE_DIR}) list(APPEND OPENSCENEGRAPH_INCLUDE_DIR ${${_osg_module_UC}_INCLUDE_DIR})
list(APPEND OPENSCENEGRAPH_LIBRARIES ${${_osg_module_UC}_LIBRARIES}) list(APPEND OPENSCENEGRAPH_LIBRARIES ${${_osg_module_UC}_LIBRARIES})
endif()
if(OpenSceneGraph_MARK_AS_ADVANCED) if(OpenSceneGraph_MARK_AS_ADVANCED)
OSG_MARK_AS_ADVANCED(${_osg_module}) OSG_MARK_AS_ADVANCED(${_osg_module})