mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 06:09:00 +08:00
[libpng] fix Android ARM triplet build failure (#18115)
* [libpng] use check for PNG_ARM_NEON * arm-android build keeps failing * [libpng] add host dependency * [libpng] update baseline * [libpng] use 'version-string' * Update ports/libpng/vcpkg.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libpng] update baseline Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
This commit is contained in:
parent
bb94111424
commit
f6eb4c50ba
@ -1,9 +0,0 @@
|
|||||||
Source: libpng
|
|
||||||
Version: 1.6.37
|
|
||||||
Port-Version: 14
|
|
||||||
Build-Depends: zlib
|
|
||||||
Homepage: https://github.com/glennrp/libpng
|
|
||||||
Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files.
|
|
||||||
|
|
||||||
Feature: apng
|
|
||||||
Description: This is backward compatible with the regular libpng, both in library usage and format.
|
|
@ -55,24 +55,26 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION )
|
set(LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION )
|
||||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL iOS)
|
if(VCPKG_TARGET_IS_IOS)
|
||||||
set(LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_HARDWARE_OPTIMIZATIONS=OFF")
|
list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_HARDWARE_OPTIMIZATIONS=OFF")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(LD_VERSION_SCRIPT_OPTION )
|
set(LD_VERSION_SCRIPT_OPTION )
|
||||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Android)
|
if(VCPKG_TARGET_IS_ANDROID)
|
||||||
set(LD_VERSION_SCRIPT_OPTION "-Dld-version-script=OFF")
|
set(LD_VERSION_SCRIPT_OPTION "-Dld-version-script=OFF")
|
||||||
|
# for armeabi-v7a, check whether NEON is available
|
||||||
|
list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_ARM_NEON=check")
|
||||||
|
else()
|
||||||
|
list(APPEND LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_ARM_NEON=on")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_cmake_configure(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-DPNG_MAN_DIR=share/${PORT}/man
|
-DPNG_MAN_DIR=share/${PORT}/man
|
||||||
${LIBPNG_APNG_OPTION}
|
${LIBPNG_APNG_OPTION}
|
||||||
${LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION}
|
${LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION}
|
||||||
${LD_VERSION_SCRIPT_OPTION}
|
${LD_VERSION_SCRIPT_OPTION}
|
||||||
-DPNG_ARM_NEON=on
|
|
||||||
-DPNG_STATIC=${PNG_STATIC_LIBS}
|
-DPNG_STATIC=${PNG_STATIC_LIBS}
|
||||||
-DPNG_SHARED=${PNG_SHARED_LIBS}
|
-DPNG_SHARED=${PNG_SHARED_LIBS}
|
||||||
-DPNG_TESTS=OFF
|
-DPNG_TESTS=OFF
|
||||||
@ -82,9 +84,9 @@ vcpkg_configure_cmake(
|
|||||||
OPTIONS_DEBUG
|
OPTIONS_DEBUG
|
||||||
-DSKIP_INSTALL_HEADERS=ON
|
-DSKIP_INSTALL_HEADERS=ON
|
||||||
)
|
)
|
||||||
vcpkg_install_cmake()
|
vcpkg_cmake_install()
|
||||||
|
|
||||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/libpng)
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/libpng)
|
||||||
set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpng16.pc")
|
set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpng16.pc")
|
||||||
if(EXISTS ${_file})
|
if(EXISTS ${_file})
|
||||||
file(READ "${_file}" _contents)
|
file(READ "${_file}" _contents)
|
||||||
|
23
ports/libpng/vcpkg.json
Normal file
23
ports/libpng/vcpkg.json
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "libpng",
|
||||||
|
"version": "1.6.37",
|
||||||
|
"port-version": 15,
|
||||||
|
"description": "libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files",
|
||||||
|
"homepage": "https://github.com/glennrp/libpng",
|
||||||
|
"dependencies": [
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake",
|
||||||
|
"host": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake-config",
|
||||||
|
"host": true
|
||||||
|
},
|
||||||
|
"zlib"
|
||||||
|
],
|
||||||
|
"features": {
|
||||||
|
"apng": {
|
||||||
|
"description": "This is backward compatible with the regular libpng, both in library usage and format"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -3442,7 +3442,7 @@
|
|||||||
},
|
},
|
||||||
"libpng": {
|
"libpng": {
|
||||||
"baseline": "1.6.37",
|
"baseline": "1.6.37",
|
||||||
"port-version": 14
|
"port-version": 15
|
||||||
},
|
},
|
||||||
"libpopt": {
|
"libpopt": {
|
||||||
"baseline": "1.16-13",
|
"baseline": "1.16-13",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "09cdb4f54e6cc8a6a1eebbbc4c9f786d0ee652b8",
|
||||||
|
"version": "1.6.37",
|
||||||
|
"port-version": 15
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "67dd33a2c4a539e58ec4898b7b908baca3840063",
|
"git-tree": "67dd33a2c4a539e58ec4898b7b908baca3840063",
|
||||||
"version-string": "1.6.37",
|
"version-string": "1.6.37",
|
||||||
|
Loading…
Reference in New Issue
Block a user