From 720846fa62e516d3e5cee0b5633fd52d424d6aa9 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 7 Mar 2014 14:11:45 -0800 Subject: [PATCH] fix FindGLUT to get path to GLUT dll --- cmake/modules/FindGLUT.cmake | 8 ++++---- interface/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/modules/FindGLUT.cmake b/cmake/modules/FindGLUT.cmake index 05ea59b7fd..b143ad1134 100644 --- a/cmake/modules/FindGLUT.cmake +++ b/cmake/modules/FindGLUT.cmake @@ -4,14 +4,14 @@ # GLUT_FOUND # GLUT_INCLUDE_DIR # GLUT_LIBRARIES -# GLUT_WIN_DLL - Optionally defined for Win32 +# GLUT_DLL_PATH - Optionally defined for Win32 # # Created on 2/6/2014 by Stephen Birarda # # Adapted from FindGLUT.cmake available in tlorach's OpenGLText Repository # https://raw.github.com/tlorach/OpenGLText/master/cmake/FindGLUT.cmake -if (GLUT_INCLUDE_DIR AND GLUT_LIBRARIES AND (NOT WIN32 OR GLUT_WIN_DLL)) +if (GLUT_INCLUDE_DIR AND GLUT_LIBRARIES AND (NOT WIN32 OR GLUT_DLL_PATH)) set(GLUT_FOUND TRUE) else () if (WIN32) @@ -23,7 +23,7 @@ else () endif() find_library(GLUT_glut_LIBRARY freeglut PATH_SUFFIXES lib/${WIN_ARCH_DIR} HINTS ${WIN_GLUT_SEARCH_DIRS}) - find_library(GLUT_WIN_DLL freeglut.dll PATH_SUFFIXES bin/${WIN_ARCH_DIR} HINTS ${WIN_GLUT_SEARCH_DIRS}) + find_library(GLUT_DLL_PATH freeglut.dll PATH_SUFFIXES bin/${WIN_ARCH_DIR} HINTS ${WIN_GLUT_SEARCH_DIRS}) else () find_path(GLUT_INCLUDE_DIR GL/glut.h "${GLUT_LOCATION}/include" @@ -73,7 +73,7 @@ else () include(FindPackageHandleStandardArgs) if (WIN32) - find_package_handle_standard_args(GLUT DEFAULT_MSG GLUT_INCLUDE_DIR GLUT_LIBRARIES GLUT_WIN_DLL) + find_package_handle_standard_args(GLUT DEFAULT_MSG GLUT_INCLUDE_DIR GLUT_LIBRARIES GLUT_DLL_PATH) else () find_package_handle_standard_args(GLUT DEFAULT_MSG GLUT_INCLUDE_DIR GLUT_LIBRARIES) endif() diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 2267f107f7..40fc59030f 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -235,7 +235,7 @@ else (APPLE) # have CMake copy the dlls for GLUT and GLEW as a post build step add_custom_command(TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different - ${GLUT_WIN_DLL} + ${GLUT_DLL_PATH}/freeglut.dll $ ) endif()