Skip to content

Commit fb61457

Browse files
committed
add libwebp for apple
1 parent 99602f8 commit fb61457

File tree

4 files changed

+70
-17
lines changed

4 files changed

+70
-17
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ If cloning repositories from GitHub is slow, or if you need to use an internal p
144144
| uavs3d | 1.2.1 | https://github.com/uavs3/uavs3d.git | export GIT_UAVS3D_UPSTREAM=git@xx:yy/UAVS3D.git |
145145
| xml2 | 2.13.6 | https://github.com/GNOME/libxml2.git | export GIT_FONTCONFIG_UPSTREAM=git@xx:yy/fontconfig.git |
146146
| yuv | stable-eb6e7bb | https://github.com/debugly/libyuv.git | export GIT_YUV_UPSTREAM=git@xx:yy/yuv.git |
147+
| webp | v1.6.0 | https://github.com/debugly/libwebp.git | export GIT_WEBP_UPSTREAM=git@xx:yy/webp.git |
147148

148149
## Tips
149150

@@ -152,11 +153,3 @@ If cloning repositories from GitHub is slow, or if you need to use an internal p
152153
- To skip applying FFmpeg patches during initialization, add the --skip-patches parameter when using the init command.
153154
- Currently, FFmpeg uses the module-full.sh configuration, resulting in slightly larger package sizes.
154155
- You can download all pre-compiled GitHub libraries to your own server and specify your server address using MR_DOWNLOAD_BASEURL before running the install command.
155-
156-
## Donate
157-
158-
Compiling third-party libraries is time-consuming. I aim to contribute to the open-source community by pre-compiling all third-party libraries required by debugly/ijkplayer into static libraries and xcframeworks for public use.
159-
160-
If you'd like to contribute to the open-source community, consider buying me a coffee to keep me energized.
161-
162-
![donate.jpg](https://i.postimg.cc/xdVqnBLp/IMG-7481.jpg)

README_zh-CN.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,12 @@ MRFFToolChain 的构建产物是为 [fsplayer](https://github.com/debugly/fsplay
146146
| uavs3d | 1.2.1 | https://github.com/uavs3/uavs3d.git | export GIT_UAVS3D_UPSTREAM=git@xx:yy/UAVS3D.git |
147147
| xml2 | 2.13.6 | https://github.com/GNOME/libxml2.git | export GIT_FONTCONFIG_UPSTREAM=git@xx:yy/fontconfig.git |
148148
| yuv | stable-eb6e7bb | https://github.com/debugly/libyuv.git | export GIT_YUV_UPSTREAM=git@xx:yy/yuv.git |
149+
| webp | v1.6.0 | https://github.com/debugly/libwebp.git | export GIT_WEBP_UPSTREAM=git@xx:yy/webp.git |
149150

150151
## 提示
151152

152153
- 要下载预编译的 xcframework 库,使用 install 命令时添加 --fmwk 参数
153154
- 初始化时要跳过拉取远程仓库,使用 init 命令时添加 --skip-pull-base 参数
154155
- 初始化时要跳过应用 FFmpeg 补丁,使用 init 命令时添加 --skip-patches 参数
155156
- 目前 FFmpeg 使用 module-full.sh 配置,功能全但同时导致包体积略大
156-
- 您可以将所有预编译的 GitHub 库下载到自己的服务器,并在运行 install 命令前通过 MR\_DOWNLOAD\_BASEURL 指定您的服务器地址
157-
158-
## 捐赠
159-
160-
编译第三方库非常耗时,我将 debugly/fsplayer 所需的所有第三方库预编译为静态库供公众使用,希望为开源社区贡献微薄之力。
161-
162-
如果屏幕前的你也想为开源社区贡献一份力量,不妨请我喝杯咖啡提提神儿。
163-
164-
![donate.jpg](https://i.postimg.cc/xdVqnBLp/IMG-7481.jpg)
157+
- 可以将所有预编译的 GitHub 库下载到自己的服务器,并在运行 install 命令前通过 MR\_DOWNLOAD\_BASEURL 指定你的服务器地址

configs/libs/webp.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#! /usr/bin/env bash
2+
#
3+
# Copyright (C) 2021 Matt Reach<qianlongxu@gmail.com>
4+
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
#
18+
#
19+
20+
export LIB_NAME='webp'
21+
export LIPO_LIBS="libwebp"
22+
export LIB_DEPENDS_BIN="cmake"
23+
export CMAKE_TARGETS_NAME=webpdecoder,webpdemux
24+
export GIT_LOCAL_REPO=extra/webp
25+
export GIT_COMMIT=v1.6.0
26+
export REPO_DIR=webp
27+
export GIT_REPO_VERSION=v1.6.0
28+
29+
# you can export GIT_WEBP_UPSTREAM=git@xx:yy/webp.git use your mirror
30+
if [[ "$GIT_WEBP_UPSTREAM" != "" ]] ;then
31+
export GIT_UPSTREAM="$GIT_WEBP_UPSTREAM"
32+
else
33+
export GIT_UPSTREAM=https://github.com/debugly/libwebp.git
34+
fi
35+
36+
# pre compiled
37+
export PRE_COMPILE_TAG_TVOS=
38+
export PRE_COMPILE_TAG_MACOS=
39+
export PRE_COMPILE_TAG_IOS=
40+
export PRE_COMPILE_TAG_ANDROID=

do-compile/apple/webp.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#! /usr/bin/env bash
2+
#
3+
# Copyright (C) 2021 Matt Reach<qianlongxu@gmail.com>
4+
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
# append "-DCMAKE_MACOSX_BUNDLE=NO" fix compile error:
18+
19+
# CMake Error at CMakeLists.txt:537 (install):
20+
# install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable
21+
# target "dwebp".
22+
23+
# call common cmake build shell
24+
./cmake-compatible.sh "-DBUILD_SHARED_LIBS=OFF -DWEBP_LINK_STATIC=ON -DCMAKE_MACOSX_BUNDLE=NO -DWEBP_ENABLE_SIMD=ON -DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF -DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPINFO=OFF -DWEBP_BUILD_LIBWEBPMUX=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DWEBP_NEAR_LOSSLESS=OFF"
25+
26+
# clean cmake
27+
rm -rf ${MR_BUILD_PREFIX}/share

0 commit comments

Comments
 (0)