[libpng] Fix arm neon (#30226)

This commit is contained in:
Kai Pastor 2023-03-20 07:17:54 +01:00 committed by GitHub
parent ab1020f24d
commit 023974c3db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 5 deletions

View File

@ -1,5 +1,3 @@
vcpkg_minimum_required(VERSION 2022-09-15) # for ${VERSION}
# Download the apng patch
set(LIBPNG_APNG_PATCH_PATH "")
set(LIBPNG_APNG_OPTION "")
@ -56,8 +54,14 @@ vcpkg_list(SET LD_VERSION_SCRIPT_OPTION)
if(VCPKG_TARGET_IS_ANDROID)
vcpkg_list(APPEND LD_VERSION_SCRIPT_OPTION "-Dld-version-script=OFF")
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
# for armeabi-v7a, check whether NEON is available
vcpkg_list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_ARM_NEON=check")
vcpkg_cmake_get_vars(cmake_vars_file)
include("${cmake_vars_file}")
if(VCPKG_DETECTED_CMAKE_ANDROID_ARM_NEON)
vcpkg_list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_ARM_NEON=on")
else()
# for armeabi-v7a, check whether NEON is available
vcpkg_list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_ARM_NEON=check")
endif()
endif()
endif()

View File

@ -1,6 +1,7 @@
{
"name": "libpng",
"version": "1.6.39",
"port-version": 1,
"description": "libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files",
"homepage": "https://github.com/glennrp/libpng",
"license": "libpng-2.0",
@ -13,6 +14,11 @@
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-cmake-get-vars",
"host": true,
"platform": "arm & android"
},
"zlib"
],
"features": {

View File

@ -4294,7 +4294,7 @@
},
"libpng": {
"baseline": "1.6.39",
"port-version": 0
"port-version": 1
},
"libpopt": {
"baseline": "1.16",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "af144fe56e6e4c08cd8089d2e1dd46bae60a5062",
"version": "1.6.39",
"port-version": 1
},
{
"git-tree": "5418b205ed842ffdcd4d65c07f43087e0afcf3f3",
"version": "1.6.39",