diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-03-25 14:22:55 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2021-04-23 10:46:27 +0200 |
commit | 143509a0224097b56b27c7f3ebc8065f6ef28951 (patch) | |
tree | 590e871d48abaeade7866277d7edea625456338f | |
parent | 9546da13d189d93186e91779ab411efe68ed85dc (diff) |
CMake: Fix vendored libwebp to build for universal macOS
The 3rdparty NEON libwebp sources need to built for the macOS and iOS
arm64 slices when doing a universal build.
Task-number: QTBUG-85447
Fixes: QTBUG-93017
Change-Id: Id55e58027adbea9e3d83e1a4b7309ff36cf01453
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit b01f23ed9b32a84c5ffd6f45f08c4b81705b1979)
-rw-r--r-- | src/plugins/imageformats/webp/CMakeLists.txt | 17 |
1 files changed, 13 insertions, 4 deletions
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: |