Skip to content

Commit

Permalink
Make it possible to build without wayland or x11
Browse files Browse the repository at this point in the history
  • Loading branch information
tronical committed Oct 4, 2023
1 parent 79c1f2d commit fb16949
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
5 changes: 0 additions & 5 deletions classes/slint_common.bbclass
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@

REQUIRED_DISTRO_FEATURES:append:class-target = "opengl"

DEPENDS:append:class-target = " fontconfig libxcb wayland virtual/libgl"
DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH}"

do_compile:prepend() {
export RUST_FONTCONFIG_DLOPEN=on
oe_cargo_fix_env
Expand Down
5 changes: 5 additions & 0 deletions recipes-example/slint-demos/slint-demos_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ LICENSE = "GPLv3 | Slint-Commercial"

inherit slint_common

REQUIRED_DISTRO_FEATURES:append:class-target = "opengl"

DEPENDS:append:class-target = " fontconfig libxcb wayland virtual/libgl"
DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH}"

CARGO_DISABLE_BITBAKE_VENDORING = "1"

do_configure[network] = "1"
Expand Down
5 changes: 5 additions & 0 deletions recipes-slint/slint/slint-cpp-v1.inc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a71019dc9c240d7add35e9d036870929"
inherit cmake
inherit slint_common

REQUIRED_DISTRO_FEATURES:append:class-target = "opengl"

DEPENDS:append:class-target = " fontconfig libxcb wayland virtual/libgl"
DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH}"

SLINT_REV ?= "master"
SRC_URI = "git://github.com/slint-ui/slint.git;protocol=https;branch=master;rev=${SLINT_REV}"

Expand Down
9 changes: 7 additions & 2 deletions recipes-slint/slint/slint-cpp-v2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ inherit cmake
inherit pkgconfig
inherit slint_common

REQUIRED_DISTRO_FEATURES:append:class-target = "opengl"

DEPENDS:append:class-target = " fontconfig virtual/libgl"
DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH}"

SLINT_REV ?= "master"
SRC_URI = "git://github.com/slint-ui/slint.git;protocol=https;branch=master;rev=${SLINT_REV}"

Expand All @@ -35,8 +40,8 @@ PACKAGECONFIG[backend-linuxkms] = "-DSLINT_FEATURE_BACKEND_LINUXKMS=ON, -DSLINT_
PACKAGECONFIG[renderer-skia] = "-DSLINT_FEATURE_RENDERER_SKIA=ON, -DSLINT_FEATURE_RENDERER_SKIA=OFF,"
PACKAGECONFIG[renderer-femtovg] = "-DSLINT_FEATURE_RENDERER_FEMTOVG=ON, -DSLINT_FEATURE_RENDERER_FEMTOVG=OFF,"
PACKAGECONFIG[interpreter] = "-DSLINT_FEATURE_INTERPRETER=ON, -DSLINT_FEATURE_INTERPRETER=OFF,"
PACKAGECONFIG[backend-winit-wayland] = "-DSLINT_FEATURE_BACKEND_WINIT_WAYLAND=ON, -DSLINT_FEATURE_BACKEND_WINIT_WAYLAND=OFF,"
PACKAGECONFIG[backend-winit-x11] = "-DSLINT_FEATURE_BACKEND_WINIT_X11=ON, -DSLINT_FEATURE_BACKEND_WINIT_X11=OFF,"
PACKAGECONFIG[backend-winit-wayland] = "-DSLINT_FEATURE_BACKEND_WINIT_WAYLAND=ON, -DSLINT_FEATURE_BACKEND_WINIT_WAYLAND=OFF,wayland"
PACKAGECONFIG[backend-winit-x11] = "-DSLINT_FEATURE_BACKEND_WINIT_X11=ON, -DSLINT_FEATURE_BACKEND_WINIT_X11=OFF,libxcb"

S = "${WORKDIR}/git"

Expand Down

0 comments on commit fb16949

Please sign in to comment.