i think this is probably needed for doing wayland on freebsd?

This commit is contained in:
IoIxD 2026-04-27 12:39:23 -07:00
commit d909812891
3 changed files with 13 additions and 3 deletions

View file

@ -35,7 +35,7 @@ else()
option(MW_USE_FREETYPE2 "Use FreeType 2" ON)
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux OR ${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD)
option(MW_USE_WAYLAND "Enable Wayland backend" ON)
endif()

5
configure vendored
View file

@ -84,12 +84,15 @@ sub def_platform {
param_set("freetype2", 0);
param_set("stb-truetype", 1);
}
if($target eq "Linux") {
if($target eq "Linux" || $target eq "FreeBSD") {
param_set("x11", 1);
if(!param_get("tiny")){
param_set("wayland", 1);
}
}
if($target eq "NetBSD" || $target eq "OpenBSD") {
param_set("x11", 1);
}
}
foreach my $l (@ARGV) {

View file

@ -1,7 +1,14 @@
add_incdir2("-I/usr/local/include");
add_libdir(
"-L/usr/local/lib -Wl,-R/usr/local/lib");
use_backend("x11");
if (param_get("wayland") && not(param_get("tiny"))) {
push(@enabled_backends, "wayland");
}
if (param_get("x11")) {
push(@enabled_backends, "x11");
}
add_libs("-lpthread");
add_cflags("-DUSE_DBUS");