summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2021-09-23 17:39:41 -0400
committerKhem Raj <raj.khem@gmail.com>2021-09-24 08:12:36 -0700
commitacb8fa6989ae9e4dfcce89de0e198599cc1ec881 (patch)
treef04086c1d5a08c9f708aa40ade6f8875e267f47d /meta-oe/recipes-graphics
parent27857a94d8ad1c8757db167be8ddb58084de6513 (diff)
downloadmeta-openembedded-acb8fa6989ae9e4dfcce89de0e198599cc1ec881.tar.gz
vk-gl-cts: allow the user to specify the target
When building opengl-es-cts (for example), instead of hard-coding a specific target to build (surfaceless), leave the choice empty by default which instructs the package's build system to search the sysroot and try to determine which target to use (i.e. the "Default" target). Provide overrides (in the form of PACAKGECONFIGs) to allow the user to specify a specific target to build (if they don't want the target selected automatically). Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics')
-rw-r--r--meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc29
1 files changed, 26 insertions, 3 deletions
diff --git a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
index f61921473..881d6ca82 100644
--- a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
+++ b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
@@ -18,9 +18,9 @@ S = "${WORKDIR}/git"
18 18
19inherit pkgconfig cmake features_check 19inherit pkgconfig cmake features_check
20 20
21REQUIRED_DISTRO_FEATURES += "opengl" 21ANY_OF_DISTRO_FEATURES += "opengl wayland"
22 22
23DEPENDS += "libpng zlib virtual/libgles2 virtual/egl" 23DEPENDS += "libpng zlib virtual/libgles2"
24 24
25SRC_URI += "file://0001-Workaround-for-GCC-11-uninit-variable-warnings-946.patch;patchdir=external/amber/src \ 25SRC_URI += "file://0001-Workaround-for-GCC-11-uninit-variable-warnings-946.patch;patchdir=external/amber/src \
26 file://0001-Include-limits-header-for-numeric_limits.patch;patchdir=external/vulkancts \ 26 file://0001-Include-limits-header-for-numeric_limits.patch;patchdir=external/vulkancts \
@@ -36,7 +36,30 @@ SRC_URI:append:toolchain-clang = "\
36 file://fix-clang-private-operator.patch \ 36 file://fix-clang-private-operator.patch \
37" 37"
38 38
39EXTRA_OECMAKE:append = " -DDEQP_TARGET=surfaceless" 39# The best thing for the user to do is to not specify any of the following
40# PACKAGECONFIGs (i.e. leave it blank) which tells the project to do its own
41# probing and build what it thinks is appropriate.
42# However, if you want, you can specify one of the following PACKAGECONFIGs
43# to override this behaviour.
44PACKAGECONFIG ??= ""
45PACKAGECONFIG[surfaceless] = "-DDEQP_TARGET=surfaceless,,,,,wayland x11_egl x11_glx x11_egl_glx"
46PACKAGECONFIG[wayland] = "-DDEQP_TARGET=wayland,,wayland,,,surfaceless x11_egl x11_glx x11_egl_glx"
47PACKAGECONFIG[x11_egl] = "-DDEQP_TARGET=x11_egl,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_glx x11_egl_glx"
48PACKAGECONFIG[x11_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11,,,surfaceless wayland x11_egl x11_egl_glx"
49PACKAGECONFIG[x11_egl_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_egl x11_glx"
50
51python __anonymous() {
52 # if the user doesn't specify any PACKAGECONFIG then the cts build system
53 # is going to probe the sysroot to try to figure out what to build
54 # in this case we try to guess whether the user is building for wayland
55 # or x11 and add the required dependencies automatically
56 distrofeatures = (d.getVar("DISTRO_FEATURES") or "")
57 if not bb.utils.contains_any("PACKAGECONFIG", ["surfaceless", "wayland", "x11_egl", "x11_glx", "x11_egl_glx"], True, False, d):
58 if "wayland" in distrofeatures:
59 d.appendVar("DEPENDS", " wayland ")
60 if "x11" in distrofeatures:
61 d.appendVar("DEPENDS", " virtual/libx11 virtual/egl ")
62}
40 63
41CTSDIR = "/usr/lib/${BPN}" 64CTSDIR = "/usr/lib/${BPN}"
42 65