aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics/freeglut/freeglut_3.4.0.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-01-10 02:24:00 -0800
committerKhem Raj <raj.khem@gmail.com>2023-01-11 08:37:58 -0800
commita9212722c1b1a2ab29215651063ca94fb114c39b (patch)
tree913db3d6c8c895d928c62eb9cd0a62cfcf2fe9e9 /meta-oe/recipes-graphics/freeglut/freeglut_3.4.0.bb
parent100eff90ad7cfceace6e08e40e42339acbc1c547 (diff)
downloadmeta-openembedded-a9212722c1b1a2ab29215651063ca94fb114c39b.tar.gz
freeglut: Add packageconfigs for x11/wayland/gles
helps it compiling on on different openGL implementations which may not implement fulll openGL specs Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics/freeglut/freeglut_3.4.0.bb')
-rw-r--r--meta-oe/recipes-graphics/freeglut/freeglut_3.4.0.bb18
1 files changed, 14 insertions, 4 deletions
diff --git a/meta-oe/recipes-graphics/freeglut/freeglut_3.4.0.bb b/meta-oe/recipes-graphics/freeglut/freeglut_3.4.0.bb
index 627ce23544..86b94149bc 100644
--- a/meta-oe/recipes-graphics/freeglut/freeglut_3.4.0.bb
+++ b/meta-oe/recipes-graphics/freeglut/freeglut_3.4.0.bb
@@ -6,14 +6,24 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=89c0b58a3e01ce3d8254c9f59e78adfb"
SRC_URI = "https://sourceforge.net/projects/${BPN}/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz"
SRC_URI[sha256sum] = "3c0bcb915d9b180a97edaebd011b7a1de54583a838644dcd42bb0ea0c6f3eaec"
-inherit cmake features_check
+inherit cmake features_check pkgconfig
-# depends on virtual/libx11, virtual/libgl
-REQUIRED_DISTRO_FEATURES = "x11 opengl"
+# depends on virtual/libgl
+REQUIRED_DISTRO_FEATURES = "opengl"
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+PACKAGECONFIG[gles] = "-DFREEGLUT_GLES=ON,-DFREEGLUT_GLES=OFF,"
+PACKAGECONFIG[wayland] = "-DFREEGLUT_WAYLAND=ON,-DFREEGLUT_WAYLAND=OFF,libxkbcommon"
+PACKAGECONFIG[demos] = "-DFREEGLUT_BUILD_DEMOS=ON,-DFREEGLUT_BUILD_DEMOS=OFF,"
+PACKAGECONFIG[x11] = ",,virtual/libx11 libice libxmu libglu libxrandr libxext"
# Do not use -fno-common, check back when upgrading to new version it might not be needed
CFLAGS += "-fcommon"
PROVIDES += "mesa-glut"
-DEPENDS = "virtual/libx11 libxmu libxi virtual/libgl libglu libxrandr"
+DEPENDS = "virtual/libgl libxi"
+
+do_install:append() {
+ # Remove buildpaths
+ sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/FreeGLUT/FreeGLUTTargets.cmake
+}