mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 20:13:40 +02:00
more GLUT module cleanup
This commit is contained in:
parent
45ff1e4055
commit
42addd4ed4
1 changed files with 75 additions and 83 deletions
|
@ -10,6 +10,9 @@
|
|||
# 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)
|
||||
set(GLUT_FOUND TRUE)
|
||||
elseif()
|
||||
if (WIN32)
|
||||
find_path( GLUT_INCLUDE_DIR GL/glut.h
|
||||
"${GLUT_ROOT_DIR}/include"
|
||||
|
@ -72,12 +75,9 @@ else ()
|
|||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
)
|
||||
endif (WIN32)
|
||||
endif ()
|
||||
|
||||
set(GLUT_FOUND "NO")
|
||||
|
||||
if(GLUT_INCLUDE_DIR)
|
||||
if(GLUT_glut_LIBRARY)
|
||||
if(GLUT_INCLUDE_DIR AND GLUT_glut_LIBRARY)
|
||||
# Is -lXi and -lXmu required on all platforms that have it?
|
||||
# If not, we need some way to figure out what platform we are on.
|
||||
set(GLUT_LIBRARIES
|
||||
|
@ -85,24 +85,16 @@ if(GLUT_INCLUDE_DIR)
|
|||
${GLUT_Xmu_LIBRARY}
|
||||
${GLUT_Xi_LIBRARY}
|
||||
)
|
||||
set( GLUT_FOUND "YES")
|
||||
set(GLUT_FOUND TRUE)
|
||||
|
||||
set(GLUT_LIBRARY ${GLUT_LIBRARIES})
|
||||
set(GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
|
||||
|
||||
endif(GLUT_glut_LIBRARY)
|
||||
endif(GLUT_INCLUDE_DIR)
|
||||
endif ()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
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)
|
||||
|
||||
mark_as_advanced(
|
||||
GLUT_INCLUDE_DIR
|
||||
GLUT_glut_LIBRARY
|
||||
GLUT_Xmu_LIBRARY
|
||||
GLUT_Xi_LIBRARY
|
||||
)
|
||||
mark_as_advanced(GLUT_INCLUDE_DIR GLUT_glut_LIBRARY GLUT_Xmu_LIBRARY GLUT_Xi_LIBRARY)
|
||||
|
||||
endif ()
|
Loading…
Reference in a new issue