Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to use wayland on linux, enabled by default
Browse files Browse the repository at this point in the history
bwrsandman committed Jun 16, 2024
1 parent 19cb98d commit 49523cb
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ option(BGFX_INSTALL "Create installation target." ON)
cmake_dependent_option(
BGFX_INSTALL_EXAMPLES "Install examples and their runtimes." OFF "BGFX_INSTALL;BGFX_BUILD_EXAMPLES" OFF
)
cmake_dependent_option(BGFX_WITH_WAYLAND "Use Wayland backend." ON "CMAKE_SYSTEM_NAME STREQUAL 'Linux'" OFF)
option(BGFX_CUSTOM_TARGETS "Include convenience custom targets." ON)
option(BGFX_CONFIG_MULTITHREADED "Build bgfx with multithreaded configuration" ON)
option(BGFX_CONFIG_RENDERER_WEBGPU "Enable the webgpu renderer" OFF)
4 changes: 4 additions & 0 deletions cmake/bgfx/bgfx.cmake
Original file line number Diff line number Diff line change
@@ -85,6 +85,10 @@ if(NOT ${BGFX_CONFIG_DEFAULT_MAX_ENCODERS} STREQUAL "")
)
endif()

if(BGFX_WITH_WAYLAND)
target_compile_definitions(bgfx PRIVATE "WL_EGL_PLATFORM=1")
endif()

set(BGFX_CONFIG_OPTIONS "")
list(
APPEND

0 comments on commit 49523cb

Please sign in to comment.