diff options
author | Brad King <brad.king@kitware.com> | 2014-09-22 13:13:05 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-09-22 13:13:05 (GMT) |
commit | 2f3985c6a5c35f53301762fe74cf83213a29afd0 (patch) | |
tree | bc895ece70011205784f6574c5551fdfd9caee48 /Modules | |
parent | e6f0bb7b1577923b6252370a6c8dd2db202dece7 (diff) | |
parent | b683da3efa4873c4e51339935f7c7ea67c15e246 (diff) | |
download | CMake-2f3985c6a5c35f53301762fe74cf83213a29afd0.zip CMake-2f3985c6a5c35f53301762fe74cf83213a29afd0.tar.gz CMake-2f3985c6a5c35f53301762fe74cf83213a29afd0.tar.bz2 |
Merge topic 'FindOpenSceneGraph-pieces-not-found'
b683da3e FindOpenSceneGraph: Do not add unfound OSG libs if not required
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindOpenSceneGraph.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/FindOpenSceneGraph.cmake b/Modules/FindOpenSceneGraph.cmake index 7bbd753..68adff7 100644 --- a/Modules/FindOpenSceneGraph.cmake +++ b/Modules/FindOpenSceneGraph.cmake @@ -203,8 +203,11 @@ foreach(_osg_module ${_osg_modules_to_process}) find_package(${_osg_module} ${_osg_quiet}) string(TOUPPER ${_osg_module} _osg_module_UC) - list(APPEND OPENSCENEGRAPH_INCLUDE_DIR ${${_osg_module_UC}_INCLUDE_DIR}) - list(APPEND OPENSCENEGRAPH_LIBRARIES ${${_osg_module_UC}_LIBRARIES}) + # 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_LIBRARIES ${${_osg_module_UC}_LIBRARIES}) + endif() if(OpenSceneGraph_MARK_AS_ADVANCED) OSG_MARK_AS_ADVANCED(${_osg_module}) |