summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-04-27 12:58:47 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-04-27 12:58:51 (GMT)
commit7c31ac668986ca4753f091258321e7928b3e904a (patch)
treecc31e9806f374a3af825e3f5cfda8203afc7a2a9 /Modules
parent06d34c4ae73278dc208ff764badbb69f4747df1a (diff)
parente1b67d0373b3cdc8e53836601b9b0f6372f84e70 (diff)
downloadCMake-7c31ac668986ca4753f091258321e7928b3e904a.zip
CMake-7c31ac668986ca4753f091258321e7928b3e904a.tar.gz
CMake-7c31ac668986ca4753f091258321e7928b3e904a.tar.bz2
Merge topic 'FindGLUT-optional-deps'
e1b67d03 FindGLUT: Add library dependencies only if they exist Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !765
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindGLUT.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 02e6df0..88d4b29 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -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)