Skip to content

Commit e49b2a3

Browse files
authored
Merge pull request #6675 from BOINC/vko_update_libwebp_vcpkg_port
[ci] update libwebp vcpkg custom port
2 parents 1cc417e + b356f92 commit e49b2a3

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 39d3d8f6..6169be39 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -185,24 +185,8 @@ if(WEBP_ENABLE_WUNUSED_RESULT)
6+
endif()
7+
8+
# ##############################################################################
9+
-# Android only.
10+
-if(ANDROID)
11+
- include_directories(${ANDROID_NDK}/sources/android/cpufeatures)
12+
- add_library(cpufeatures-webp STATIC
13+
- ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
14+
- list(APPEND INSTALLED_LIBRARIES cpufeatures-webp)
15+
- target_link_libraries(cpufeatures-webp dl)
16+
- set(SHARPYUV_DEP_LIBRARIES ${SHARPYUV_DEP_LIBRARIES} cpufeatures-webp)
17+
- set(WEBP_DEP_LIBRARIES ${WEBP_DEP_LIBRARIES} cpufeatures-webp)
18+
- set(cpufeatures_include_dir ${ANDROID_NDK}/sources/android/cpufeatures)
19+
- set(SHARPYUV_DEP_INCLUDE_DIRS ${SHARPYUV_DEP_INCLUDE_DIRS}
20+
- ${cpufeatures_include_dir})
21+
- set(WEBP_DEP_INCLUDE_DIRS ${WEBP_DEP_INCLUDE_DIRS} ${cpufeatures_include_dir})
22+
- add_definitions(-DHAVE_CPU_FEATURES_H=1)
23+
- set(HAVE_CPU_FEATURES_H 1)
24+
-else()
25+
- set(HAVE_CPU_FEATURES_H 0)
26+
-endif()
27+
+# To streamline dependency management, remove usage of the NDK-bundled cpufeatures.
28+
+set(HAVE_CPU_FEATURES_H 0)
29+
30+
function(configure_pkg_config FILE)
31+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${FILE}.in"

3rdParty/vcpkg_ports/ports/libwebp/portfile.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ vcpkg_from_github(
88
0002-cmake-config.patch
99
0003-simd.patch
1010
0008-sdl.patch
11+
0009-cpufeatures-android.patch
1112
)
1213

1314
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

3rdParty/vcpkg_ports/ports/libwebp/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "libwebp",
33
"version": "1.6.0",
4-
"port-version": 1,
4+
"port-version": 2,
55
"description": "WebP codec: library to encode and decode images in WebP format",
66
"homepage": "https://github.com/webmproject/libwebp",
77
"license": "BSD-3-Clause",

0 commit comments

Comments
 (0)