Fix build of C++ OpenGL underlay example

Test for the right feature flag and fix the compatibility feature names.
This commit is contained in:
Simon Hausmann 2023-05-23 17:25:48 +02:00
parent e2180ea0f9
commit dd04e044d0
2 changed files with 7 additions and 7 deletions

View file

@ -112,23 +112,23 @@ define_cargo_feature(backend-qt "Enable Qt based rendering backend" ON)
define_cargo_feature(experimental "Enable experimental features (no compatibility guarantees)" OFF)
# Compat options
option(SLINT_FEATURE_BACKEND_GL_ALL "This feature is an alias for SLINT_FEATURE_BACKEND_WINIT and SLINT_FEATURE_RENDERER_FEMTOVG." OFF)
option(SLINT_FEATURE_BACKEND_GL_X11 "This feature is an alias for SLINT_FEATURE_BACKEND_WINIT_X11 and SLINT_FEATURE_RENDERER_FEMTOVG." OFF)
option(SLINT_FEATURE_BACKEND_GL_WAYLAND "This feature is an alias for SLINT_FEATURE_BACKEND_WINIT_WAYLAND and SLINT_FEATURE_RENDERER_FEMTOVG." OFF)
option(SLINT_FEATURE_BACKEND_GL_ALL "This feature is an alias for SLINT_FEATURE_BACKEND_WINIT and SLINT_FEATURE_RENDERER_WINIT_FEMTOVG." OFF)
option(SLINT_FEATURE_BACKEND_GL_X11 "This feature is an alias for SLINT_FEATURE_BACKEND_WINIT_X11 and SLINT_FEATURE_RENDERER_WINIT_FEMTOVG." OFF)
option(SLINT_FEATURE_BACKEND_GL_WAYLAND "This feature is an alias for SLINT_FEATURE_BACKEND_WINIT_WAYLAND and SLINT_FEATURE_RENDERER_WINIT_FEMTOVG." OFF)
if(SLINT_FEATURE_BACKEND_GL_ALL)
set(SLINT_FEATURE_BACKEND_WINIT ON)
set(SLINT_FEATURE_RENDERER_FEMTOVG ON)
set(SLINT_FEATURE_RENDERER_WINIT_FEMTOVG ON)
endif()
if(SLINT_FEATURE_BACKEND_GL_X11)
set(SLINT_FEATURE_BACKEND_WINIT_X11 ON)
set(SLINT_FEATURE_RENDERER_FEMTOVG ON)
set(SLINT_FEATURE_RENDERER_WINIT_FEMTOVG ON)
endif()
if(SLINT_FEATURE_BACKEND_GL_WAYLAND)
set(SLINT_FEATURE_BACKEND_WINIT_WAYLAND ON)
set(SLINT_FEATURE_RENDERER_FEMTOVG ON)
set(SLINT_FEATURE_RENDERER_WINIT_FEMTOVG ON)
endif()
set_property(