summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-03-25 14:22:55 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-04-08 15:24:56 +0000
commitb01f23ed9b32a84c5ffd6f45f08c4b81705b1979 (patch)
treeff5bbbad66e23fd5d71b74b0888f075d3bd7a925 /src
parentb9750116c758cb862254850d45c58590285c0e24 (diff)
downloadqtimageformats-b01f23ed9b32a84c5ffd6f45f08c4b81705b1979.tar.gz
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 Change-Id: Id55e58027adbea9e3d83e1a4b7309ff36cf01453 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/imageformats/webp/CMakeLists.txt17
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: