@@ -165,36 +165,12 @@ else()
165165
166166 if (ENABLE_GLES)
167167 message (STATUS "Building for OpenGL Embedded Profile" )
168- if (NOT CMAKE_SYSTEM_NAME STREQUAL Linux
169- AND NOT CMAKE_SYSTEM_NAME STREQUAL Android )
170- message (FATAL_ERROR "OpenGL ES 3 support is currently only available for Linux platforms. You're building for ${CMAKE_SYSTEM_NAME } ." )
171- endif ()
172-
173- # We use a local find script for OpenGL::GLES3 until the proposed changes are merged upstream.
174- list (APPEND CMAKE_MODULE_PATH "${PROJECTM_SOURCE_DIR } /cmake/gles" )
175- find_package (OpenGL REQUIRED COMPONENTS GLES3 )
176- if (NOT TARGET OpenGL::GLES3)
177- message (FATAL_ERROR "No suitable GLES3 library was found." )
178- endif ()
179-
180- set (PROJECTM_OPENGL_LIBRARIES OpenGL::GLES3)
181168 set (USE_GLES ON )
182169 else ()
183170 message (STATUS "Building for OpenGL Core Profile" )
184- find_package (OpenGL REQUIRED )
185- set (PROJECTM_OPENGL_LIBRARIES OpenGL::GL)
186- # GLX is required by SOIL2 on platforms with the X Window System (e.g. most Linux distributions)
187- if (TARGET OpenGL::GLX)
188- list (APPEND PROJECTM_OPENGL_LIBRARIES OpenGL::GLX)
189- endif ()
190- if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
191- find_package (GLEW REQUIRED )
192- # Prefer shared, but check for static lib if shared is not available.
193- if (TARGET GLEW::glew)
194- list (APPEND PROJECTM_OPENGL_LIBRARIES GLEW::glew)
195- elseif (TARGET GLEW::glew_s)
196- list (APPEND PROJECTM_OPENGL_LIBRARIES GLEW::glew_s)
197- endif ()
171+ if (WIN32 )
172+ find_package (OpenGL REQUIRED )
173+ set (PROJECTM_OPENGL_LIBRARIES OpenGL::GL)
198174 endif ()
199175 endif ()
200176endif ()
0 commit comments