diff --git a/CMakeLists.txt b/CMakeLists.txt index feeaa9a847..4987c1a77e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -583,7 +583,7 @@ else() endif() # OpenGL ES 2.0 -if (WIN32 AND CAN_USE_GLES2) +if (CAN_USE_GLES2) if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") set (USE_GLES2 ON) else() diff --git a/adm/cmake/occt_csf.cmake b/adm/cmake/occt_csf.cmake index 995ce45ab7..e29877db5d 100644 --- a/adm/cmake/occt_csf.cmake +++ b/adm/cmake/occt_csf.cmake @@ -110,7 +110,11 @@ if (WIN32) set (CSF_OpenGlLibs "EGL GLESv2") elseif (UNIX) set (CSF_ThreadLibs "pthread rt stdc++") - set (CSF_OpenGlLibs "GL") + if (USE_GLES2) + set (CSF_OpenGlLibs "EGL GLESv2") + else() + set (CSF_OpenGlLibs "GL") + endif() set (CSF_XwLibs "X11 Xext Xmu Xi") set (CSF_dl "dl") endif()