Merge topic 'FindGLUT-optional-deps'

e1b67d03 FindGLUT: Add library dependencies only if they exist

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !765
This commit is contained in:
Brad King 2017-04-27 12:58:47 +00:00 committed by Kitware Robot
commit 7c31ac6689

View File

@ -120,10 +120,12 @@ if (GLUT_FOUND)
# If not, we need some way to figure out what platform we are on.
set( GLUT_LIBRARIES
${GLUT_glut_LIBRARY}
${GLUT_Xmu_LIBRARY}
${GLUT_Xi_LIBRARY}
${GLUT_cocoa_LIBRARY}
)
foreach(v GLUT_Xmu_LIBRARY GLUT_Xi_LIBRARY GLUT_cocoa_LIBRARY)
if(${v})
list(APPEND GLUT_LIBRARIES ${${v}})
endif()
endforeach()
if(NOT TARGET GLUT::GLUT)
add_library(GLUT::GLUT UNKNOWN IMPORTED)