Added
Link Here
|
1 |
--- build/cmake/modules/JasOpenGL.cmake.orig 2021-08-01 20:39:10 UTC |
2 |
+++ build/cmake/modules/JasOpenGL.cmake |
3 |
@@ -13,19 +13,19 @@ if (JAS_ENABLE_OPENGL AND OPENGL_FOUND) |
4 |
set(JAS_HAVE_OPENGL 0) |
5 |
message("OpenGL include directory: ${OPENGL_INCLUDE_DIR}") |
6 |
message("OpenGL libraries: ${OPENGL_LIBRARIES}") |
7 |
- find_package(GLUT ${JAS_REQUIRED}) |
8 |
- message("GLUT library found: ${GLUT_FOUND}") |
9 |
- if (GLUT_FOUND) |
10 |
- message("GLUT include directory: ${GLUT_INCLUDE_DIR}") |
11 |
- message("GLUT libraries: ${GLUT_LIBRARIES}") |
12 |
- set(CMAKE_REQUIRED_INCLUDES ${GLUT_INCLUDE_DIR}) |
13 |
- check_include_files(GL/glut.h JAS_HAVE_GL_GLUT_H) |
14 |
+ find_package(FreeGLUT ${JAS_REQUIRED}) |
15 |
+ message("GLUT library found: ${FreeGLUT_FOUND}") |
16 |
+ if (FreeGLUT_FOUND) |
17 |
+ message("GLUT include directory: ${FreeGLUT_INCLUDE_DIR}") |
18 |
+ message("GLUT libraries: ${FreeGLUT_LIBRARIES}") |
19 |
+ set(CMAKE_REQUIRED_INCLUDES ${FreeGLUT_INCLUDE_DIR}) |
20 |
+ check_include_files(GL/freeglut.h JAS_HAVE_GL_GLUT_H) |
21 |
check_include_files(glut.h JAS_HAVE_GLUT_H) |
22 |
if (JAS_HAVE_GL_GLUT_H OR JAS_HAVE_GLUT_H) |
23 |
set(JAS_HAVE_OPENGL 1) |
24 |
- include_directories(${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) |
25 |
+ include_directories(${FreeGLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}) |
26 |
else() |
27 |
- message(WARNING "The header files GL/glut.h and glut.h both appear to be missing.") |
28 |
+ message(WARNING "The header files GL/freeglut.h and glut.h both appear to be missing.") |
29 |
message(WARNING "Disabling OpenGL.") |
30 |
endif() |
31 |
endif() |
32 |
@@ -49,6 +49,6 @@ else() |
33 |
set(JAS_HAVE_OPENGL 0) |
34 |
set(OPENGL_INCLUDE_DIR "") |
35 |
set(OPENGL_LIBRARIES "") |
36 |
- set(GLUT_INCLUDE_DIR "") |
37 |
+ set(FreeGLUT_INCLUDE_DIR "") |
38 |
set(GLUT_LIBRARIES "") |
39 |
endif() |