mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 04:08:13 +02:00
remove GLUT from Cmake files
This commit is contained in:
parent
bc363dbf3b
commit
715b3a245e
3 changed files with 5 additions and 65 deletions
|
@ -1,47 +0,0 @@
|
||||||
#
|
|
||||||
# FindGLUT.cmake
|
|
||||||
#
|
|
||||||
# Try to find GLUT library and include path.
|
|
||||||
# Once done this will define
|
|
||||||
#
|
|
||||||
# GLUT_FOUND
|
|
||||||
# GLUT_INCLUDE_DIRS
|
|
||||||
# GLUT_LIBRARIES
|
|
||||||
#
|
|
||||||
# Created on 2/6/2014 by Stephen Birarda
|
|
||||||
# Copyright 2014 High Fidelity, Inc.
|
|
||||||
#
|
|
||||||
# Adapted from FindGLUT.cmake available in tlorach's OpenGLText Repository
|
|
||||||
# https://raw.github.com/tlorach/OpenGLText/master/cmake/FindGLUT.cmake
|
|
||||||
#
|
|
||||||
# Distributed under the Apache License, Version 2.0.
|
|
||||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
#
|
|
||||||
|
|
||||||
include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
|
|
||||||
hifi_library_search_hints("freeglut")
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
set(GLUT_HINT_DIRS "${FREEGLUT_SEARCH_DIRS} ${OPENGL_INCLUDE_DIR}")
|
|
||||||
|
|
||||||
find_path(GLUT_INCLUDE_DIRS GL/glut.h PATH_SUFFIXES include HINTS ${FREEGLUT_SEARCH_DIRS})
|
|
||||||
find_library(GLUT_LIBRARY freeglut PATH_SUFFIXES lib HINTS ${FREEGLUT_SEARCH_DIRS})
|
|
||||||
else ()
|
|
||||||
find_path(GLUT_INCLUDE_DIRS GL/glut.h PATH_SUFFIXES include HINTS ${FREEGLUT_SEARCH_DIRS})
|
|
||||||
find_library(GLUT_LIBRARY glut PATH_SUFFIXES lib HINTS ${FREEGLUT_SEARCH_DIRS})
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
|
|
||||||
set(GLUT_LIBRARIES "${GLUT_LIBRARY}" "${XMU_LIBRARY}" "${XI_LIBRARY}")
|
|
||||||
|
|
||||||
if (UNIX)
|
|
||||||
find_library(XI_LIBRARY Xi PATH_SUFFIXES lib HINTS ${FREEGLUT_SEARCH_DIRS})
|
|
||||||
find_library(XMU_LIBRARY Xmu PATH_SUFFIXES lib HINTS ${FREEGLUT_SEARCH_DIRS})
|
|
||||||
|
|
||||||
find_package_handle_standard_args(GLUT DEFAULT_MSG GLUT_INCLUDE_DIRS GLUT_LIBRARIES XI_LIBRARY XMU_LIBRARY)
|
|
||||||
else ()
|
|
||||||
find_package_handle_standard_args(GLUT DEFAULT_MSG GLUT_INCLUDE_DIRS GLUT_LIBRARIES)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
mark_as_advanced(GLUT_INCLUDE_DIRS GLUT_LIBRARIES GLUT_LIBRARY XI_LIBRARY XMU_LIBRARY FREEGLUT_SEARCH_DIRS)
|
|
|
@ -25,15 +25,15 @@ else ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(GL_HEADERS "#include <GLUT/glut.h>\n#include <OpenGL/glext.h>")
|
set(GL_HEADERS "#include <OpenGL/glext.h>")
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
# include the right GL headers for UNIX
|
# include the right GL headers for UNIX
|
||||||
set(GL_HEADERS "#include <GL/gl.h>\n#include <GL/glut.h>\n#include <GL/glext.h>")
|
set(GL_HEADERS "#include <GL/gl.h>\n#include <GL/glext.h>")
|
||||||
elseif (WIN32)
|
elseif (WIN32)
|
||||||
add_definitions(-D_USE_MATH_DEFINES) # apparently needed to get M_PI and other defines from cmath/math.h
|
add_definitions(-D_USE_MATH_DEFINES) # apparently needed to get M_PI and other defines from cmath/math.h
|
||||||
add_definitions(-DWINDOWS_LEAN_AND_MEAN) # needed to make sure windows doesn't go to crazy with its defines
|
add_definitions(-DWINDOWS_LEAN_AND_MEAN) # needed to make sure windows doesn't go to crazy with its defines
|
||||||
|
|
||||||
set(GL_HEADERS "#include <windowshacks.h>\n#include <GL/glew.h>\n#include <GL/glut.h>\n#include <GL/wglew.h>")
|
set(GL_HEADERS "#include <windowshacks.h>\n#include <GL/glew.h>\n#include <GL/wglew.h>")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# set up the external glm library
|
# set up the external glm library
|
||||||
|
@ -194,11 +194,10 @@ if (APPLE)
|
||||||
# link in required OS X frameworks and include the right GL headers
|
# link in required OS X frameworks and include the right GL headers
|
||||||
find_library(CoreAudio CoreAudio)
|
find_library(CoreAudio CoreAudio)
|
||||||
find_library(CoreFoundation CoreFoundation)
|
find_library(CoreFoundation CoreFoundation)
|
||||||
find_library(GLUT GLUT)
|
|
||||||
find_library(OpenGL OpenGL)
|
find_library(OpenGL OpenGL)
|
||||||
find_library(AppKit AppKit)
|
find_library(AppKit AppKit)
|
||||||
|
|
||||||
target_link_libraries(${TARGET_NAME} ${CoreAudio} ${CoreFoundation} ${GLUT} ${OpenGL} ${AppKit})
|
target_link_libraries(${TARGET_NAME} ${CoreAudio} ${CoreFoundation} ${OpenGL} ${AppKit})
|
||||||
|
|
||||||
# install command for OS X bundle
|
# install command for OS X bundle
|
||||||
INSTALL(TARGETS ${TARGET_NAME}
|
INSTALL(TARGETS ${TARGET_NAME}
|
||||||
|
@ -214,15 +213,12 @@ else (APPLE)
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
find_package(GLUT REQUIRED)
|
|
||||||
|
|
||||||
include_directories(SYSTEM "${GLUT_INCLUDE_DIRS}")
|
|
||||||
|
|
||||||
if (${OPENGL_INCLUDE_DIR})
|
if (${OPENGL_INCLUDE_DIR})
|
||||||
include_directories(SYSTEM "${OPENGL_INCLUDE_DIR}")
|
include_directories(SYSTEM "${OPENGL_INCLUDE_DIR}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}" "${GLUT_LIBRARIES}")
|
target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}")
|
||||||
|
|
||||||
# link target to external libraries
|
# link target to external libraries
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
|
|
@ -7,14 +7,5 @@ include_glm()
|
||||||
|
|
||||||
link_hifi_libraries(animation fbx shared gpu)
|
link_hifi_libraries(animation fbx shared gpu)
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
find_library(GLUT GLUT)
|
|
||||||
target_link_libraries(${TARGET_NAME} ${GLUT})
|
|
||||||
else ()
|
|
||||||
find_package(GLUT REQUIRED)
|
|
||||||
include_directories(SYSTEM "${GLUT_INCLUDE_DIRS}")
|
|
||||||
target_link_libraries(${TARGET_NAME} ${GLUT_LIBRARIES})
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# call macro to include our dependency includes and bubble them up via a property on our target
|
# call macro to include our dependency includes and bubble them up via a property on our target
|
||||||
include_dependency_includes()
|
include_dependency_includes()
|
||||||
|
|
Loading…
Reference in a new issue