mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 11:07:52 +02:00
fix FindGLUT to get path to GLUT dll
This commit is contained in:
parent
b8a03cf0f4
commit
720846fa62
2 changed files with 5 additions and 5 deletions
|
@ -4,14 +4,14 @@
|
||||||
# GLUT_FOUND
|
# GLUT_FOUND
|
||||||
# GLUT_INCLUDE_DIR
|
# GLUT_INCLUDE_DIR
|
||||||
# GLUT_LIBRARIES
|
# GLUT_LIBRARIES
|
||||||
# GLUT_WIN_DLL - Optionally defined for Win32
|
# GLUT_DLL_PATH - Optionally defined for Win32
|
||||||
#
|
#
|
||||||
# Created on 2/6/2014 by Stephen Birarda
|
# Created on 2/6/2014 by Stephen Birarda
|
||||||
#
|
#
|
||||||
# Adapted from FindGLUT.cmake available in tlorach's OpenGLText Repository
|
# Adapted from FindGLUT.cmake available in tlorach's OpenGLText Repository
|
||||||
# https://raw.github.com/tlorach/OpenGLText/master/cmake/FindGLUT.cmake
|
# 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)
|
set(GLUT_FOUND TRUE)
|
||||||
else ()
|
else ()
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
@ -23,7 +23,7 @@ else ()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_library(GLUT_glut_LIBRARY freeglut PATH_SUFFIXES lib/${WIN_ARCH_DIR} HINTS ${WIN_GLUT_SEARCH_DIRS})
|
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 ()
|
else ()
|
||||||
find_path(GLUT_INCLUDE_DIR GL/glut.h
|
find_path(GLUT_INCLUDE_DIR GL/glut.h
|
||||||
"${GLUT_LOCATION}/include"
|
"${GLUT_LOCATION}/include"
|
||||||
|
@ -73,7 +73,7 @@ else ()
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
if (WIN32)
|
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 ()
|
else ()
|
||||||
find_package_handle_standard_args(GLUT DEFAULT_MSG GLUT_INCLUDE_DIR GLUT_LIBRARIES)
|
find_package_handle_standard_args(GLUT DEFAULT_MSG GLUT_INCLUDE_DIR GLUT_LIBRARIES)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -235,7 +235,7 @@ else (APPLE)
|
||||||
# have CMake copy the dlls for GLUT and GLEW as a post build step
|
# have CMake copy the dlls for GLUT and GLEW as a post build step
|
||||||
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
|
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
${GLUT_WIN_DLL}
|
${GLUT_DLL_PATH}/freeglut.dll
|
||||||
$<TARGET_FILE_DIR:${TARGET_NAME}>
|
$<TARGET_FILE_DIR:${TARGET_NAME}>
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue