cmake: enable MLN_WITH_EGL and OPENGL_USE_GLES for Wayland (#2022)
This commit is contained in:
@@ -15,6 +15,18 @@ find_package(Threads REQUIRED)
|
||||
pkg_search_module(WEBP libwebp REQUIRED)
|
||||
pkg_search_module(LIBUV libuv REQUIRED)
|
||||
|
||||
if(MLN_WITH_WAYLAND)
|
||||
# See https://github.com/maplibre/maplibre-native/pull/2022
|
||||
|
||||
# MLN_WITH_EGL needs to be set for Wayland, otherwise this CMakeLists will
|
||||
# call find_package(OpenGL REQUIRED GLX), which is for X11.
|
||||
set(MLN_WITH_EGL TRUE)
|
||||
|
||||
# OPENGL_USE_GLES2 or OPENGL_USE_GLES3 need to be set, otherwise
|
||||
# FindOpenGL.cmake will include the GLVND library, which is for X11.
|
||||
set(OPENGL_USE_GLES3 TRUE)
|
||||
endif()
|
||||
|
||||
target_sources(
|
||||
mbgl-core
|
||||
PRIVATE
|
||||
|
||||
Reference in New Issue
Block a user