mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
Meta: Refactor the way the GUI framework is picked
This is largely based of off the work done by Andrew Kaster in #5918. Having this toggle makes much more sense, especially if there will be more UIs in the future. Co-authored-by: Andrew Kaster <andrew@ladybird.org>
This commit is contained in:
Notes:
github-actions[bot]
2026-03-29 20:01:42 +00:00
Author: https://github.com/cqundefine Commit: https://github.com/LadybirdBrowser/ladybird/commit/fbbcc73feaa Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8650 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/spholz
17
Meta/CMake/gui_framework.cmake
Normal file
17
Meta/CMake/gui_framework.cmake
Normal file
@@ -0,0 +1,17 @@
|
||||
if (ANDROID OR VCPKG_TARGET_ANDROID)
|
||||
set(_possible_guis "Android")
|
||||
set(_default_gui "Android")
|
||||
elseif (APPLE)
|
||||
set(_possible_guis "AppKit" "Qt")
|
||||
set(_default_gui "AppKit")
|
||||
else()
|
||||
set(_possible_guis "Qt")
|
||||
set(_default_gui "Qt")
|
||||
endif()
|
||||
|
||||
# Note: ladybird_option() doesn't play nicely with this variable, so we use set() directly.
|
||||
set(LADYBIRD_GUI_FRAMEWORK ${_default_gui} CACHE STRING "The GUI framework to use for the ladybird application. Possible values: ${_possible_guis}")
|
||||
|
||||
if (NOT "${LADYBIRD_GUI_FRAMEWORK}" IN_LIST _possible_guis)
|
||||
message(FATAL_ERROR "Invalid value for LADYBIRD_GUI_FRAMEWORK: ${LADYBIRD_GUI_FRAMEWORK}. Possible values: ${_possible_guis}")
|
||||
endif()
|
||||
Reference in New Issue
Block a user