Don't require GLX when KICAD_USE_EGL is enabled.

This commit is contained in:
Alex 2023-09-14 03:41:55 +03:00
parent 3e710fe7c9
commit 6ad19b3f45
1 changed files with 6 additions and 2 deletions

View File

@ -704,8 +704,12 @@ endif()
#
# Find OpenGL library, required
#
set( OpenGL_GL_PREFERENCE "LEGACY" ) # CMake 3.11+ setting; see 'cmake --help-policy CMP0072'
find_package( OpenGL REQUIRED )
if( KICAD_USE_EGL )
find_package( OpenGL REQUIRED COMPONENTS OpenGL EGL )
else()
set( OpenGL_GL_PREFERENCE "LEGACY" ) # CMake 3.11+ setting; see 'cmake --help-policy CMP0072'
find_package( OpenGL REQUIRED )
endif()
#
# Find GLEW library, required