Besides the improvements that cmake offers compared to autotools,
the advantage would be that cmake config files get created.
This is useful so that other projects can find webp using cmake.

Remove EXTRA_OECONF settings because all of them are set like this
by default.

CMakeLists.txt doesn't provide an option for selecting neon but from
what I have tested it gets selected properly.

Downside is that there is no way to deactivate gif,jpeg,tiff,png or
opengl. The libraries are used whenever they are pulled into the sysroot.

Signed-off-by: Markus Volk <f_...@t-online.de>
---
 meta/recipes-multimedia/webp/libwebp_1.3.2.bb | 35 +++++--------------
 1 file changed, 9 insertions(+), 26 deletions(-)

diff --git a/meta/recipes-multimedia/webp/libwebp_1.3.2.bb 
b/meta/recipes-multimedia/webp/libwebp_1.3.2.bb
index 63b0fd9a6c..c6a4b97884 100644
--- a/meta/recipes-multimedia/webp/libwebp_1.3.2.bb
+++ b/meta/recipes-multimedia/webp/libwebp_1.3.2.bb
@@ -18,40 +18,23 @@ SRC_URI[sha256sum] = 
"2a499607df669e40258e53d0ade8035ba4ec0175244869d1025d460562
 
 UPSTREAM_CHECK_URI = 
"http://downloads.webmproject.org/releases/webp/index.html";
 
-EXTRA_OECONF = " \
-    --disable-wic \
-    --enable-libwebpmux \
-    --enable-libwebpdemux \
-    --enable-threading \
-"
+EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON"
 
-# Do not trust configure to determine if neon is available.
-#
-EXTRA_OECONF_ARM = " \
-    
${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)}
 \
-"
-EXTRA_OECONF:append:arm = " ${EXTRA_OECONF_ARM}"
-EXTRA_OECONF:append:armeb = " ${EXTRA_OECONF_ARM}"
-
-inherit autotools lib_package
-
-PACKAGECONFIG ??= ""
-
-# libwebpdecoder is a subset of libwebp, don't build it unless requested
-PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
+inherit cmake lib_package
 
+PACKAGECONFIG ?= ""
 # Apply for examples programs: cwebp and dwebp
-PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
-PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
-PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
-
+PACKAGECONFIG[gif] = ",,giflib"
+PACKAGECONFIG[jpeg] = ",,jpeg"
+PACKAGECONFIG[png] = ",,libpng"
+PACKAGECONFIG[tiff] = ",,tiff"
 # Apply only for example program vwebp
-PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
+PACKAGECONFIG[opengl] = ",,mesa-glut"
 
 PACKAGES =+ "${PN}-gif2webp"
 
 DESCRIPTION:${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
 FILES:${PN}-gif2webp = "${bindir}/gif2webp"
 
+FILES:${PN} += "${datadir}"
 BBCLASSEXTEND += "native nativesdk"
-- 
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193456): 
https://lists.openembedded.org/g/openembedded-core/message/193456
Mute This Topic: https://lists.openembedded.org/mt/103619059/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to