2019-05-09 04:47:32 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2020-05-22 02:29:52 +08:00
|
|
|
index 6f403af..ce6f9f2 100644
|
2019-05-09 04:47:32 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2020-05-22 02:29:52 +08:00
|
|
|
@@ -258,6 +258,16 @@ ENDIF()
|
2019-05-09 04:47:32 +08:00
|
|
|
IF(FREEGLUT_GLES)
|
2020-05-22 02:29:52 +08:00
|
|
|
LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES)
|
|
|
|
LIST(APPEND LIBS GLESv2 GLESv1_CM EGL)
|
2019-05-09 04:47:32 +08:00
|
|
|
+ELSEIF(APPLE)
|
|
|
|
+ # on OSX FindOpenGL uses framework version of OpenGL, but we need X11 version
|
|
|
|
+ FIND_PATH(GLX_INCLUDE_DIR GL/glx.h
|
|
|
|
+ PATHS /opt/X11/include /usr/X11/include /usr/X11R6/include)
|
|
|
|
+ FIND_LIBRARY(OPENGL_gl_LIBRARY GL
|
|
|
|
+ PATHS /opt/X11/lib /usr/X11/lib /usr/X11R6/lib)
|
|
|
|
+ FIND_LIBRARY(OPENGL_glu_LIBRARY GLU
|
|
|
|
+ PATHS /opt/X11/lib /usr/X11/lib /usr/X11R6/lib)
|
|
|
|
+ LIST(APPEND LIBS ${OPENGL_gl_LIBRARY})
|
|
|
|
+ INCLUDE_DIRECTORIES(${GLX_INCLUDE_DIR})
|
|
|
|
ELSE()
|
|
|
|
FIND_PACKAGE(OpenGL REQUIRED)
|
|
|
|
LIST(APPEND LIBS ${OPENGL_gl_LIBRARY})
|