From b01f23ed9b32a84c5ffd6f45f08c4b81705b1979 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 25 Mar 2021 14:22:55 +0100 Subject: CMake: Fix vendored libwebp to build for universal macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 3rdparty NEON libwebp sources need to built for the macOS and iOS arm64 slices when doing a universal build. Task-number: QTBUG-85447 Change-Id: Id55e58027adbea9e3d83e1a4b7309ff36cf01453 Reviewed-by: Tor Arne Vestbø --- src/plugins/imageformats/webp/CMakeLists.txt | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/plugins/imageformats/webp/CMakeLists.txt b/src/plugins/imageformats/webp/CMakeLists.txt index adeca75..b5b2c94 100644 --- a/src/plugins/imageformats/webp/CMakeLists.txt +++ b/src/plugins/imageformats/webp/CMakeLists.txt @@ -152,10 +152,7 @@ qt_internal_extend_target(QWebpPlugin CONDITION ANDROID AND NOT ANDROID_EMBEDDED ) # special case begin -qt_internal_extend_target(QWebpPlugin - CONDITION (CMAKE_ANDROID_ARM_NEON OR CMAKE_ANDROID_ARCH_ABI STREQUAL "arm64-v8a") - AND NOT QT_FEATURE_system_webp - SOURCES +set(neon_sources ../../../3rdparty/libwebp/src/dsp/alpha_processing_neon.c ../../../3rdparty/libwebp/src/dsp/dec_neon.c ../../../3rdparty/libwebp/src/dsp/enc_neon.c @@ -166,6 +163,18 @@ qt_internal_extend_target(QWebpPlugin ../../../3rdparty/libwebp/src/dsp/upsampling_neon.c ../../../3rdparty/libwebp/src/dsp/yuv_neon.c ) + +if(NOT QT_FEATURE_system_webp) + if(ANDROID) + qt_internal_extend_target(QWebpPlugin + CONDITION (CMAKE_ANDROID_ARM_NEON OR CMAKE_ANDROID_ARCH_ABI STREQUAL "arm64-v8a") + SOURCES ${neon_sources} + ) + else() + # For universal macOS and iOS, and other platforms that support neon + qt_internal_add_simd_part(QWebpPlugin SIMD neon SOURCES ${neon_sources}) + endif() +endif() # special case end #### Keys ignored in scope 6:.:../../../3rdparty:../../../3rdparty/libwebp.pri:INTEGRITY: -- cgit v1.2.1