Skip to content

Commit e4424cc

Browse files
committed
upgrade libyuv build patch
1 parent 64a190e commit e4424cc

File tree

3 files changed

+38
-100
lines changed

3 files changed

+38
-100
lines changed

configs/libs/yuv.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,20 @@ export LIPO_LIBS="libyuv"
2222
export LIB_DEPENDS_BIN="cmake"
2323
export CMAKE_TARGETS_NAME=yuv
2424
export GIT_LOCAL_REPO=extra/yuv
25-
export GIT_COMMIT=4825d9b
25+
26+
# ✅----------------
27+
# 4e8a843b 2024年4月1日 使用单个.a
28+
# f94b8cf7 2024年4月8日 使用单个.a
29+
# ❌----------------
30+
# b5a18f9d 2024年12月30日 使用多个.a
31+
# efd164d6 2024年6月18日 使用多个.a
32+
# 3af6cafe 2024年4月11日 使用多个.a
33+
# e52007ef 2024年4月9日 中间编译报错
34+
35+
export GIT_COMMIT=f94b8cf7
2636
export REPO_DIR=yuv
27-
export GIT_REPO_VERSION=main-4825d9b
28-
export PATCH_DIR=yuv-main
37+
export GIT_REPO_VERSION=main-f94b8cf7
38+
export PATCH_DIR=yuv
2939

3040
# you can export GIT_YUV_UPSTREAM=git@xx:yy/yuv.git use your mirror
3141
if [[ "$GIT_YUV_UPSTREAM" != "" ]] ;then

patches/yuv-main/0001-skip-binary-and-shared-lib-and-jpeg.patch

Lines changed: 0 additions & 67 deletions
This file was deleted.
Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,66 @@
1-
From adaf7690b34ade92e3cfb0af812ec8c534381b12 Mon Sep 17 00:00:00 2001
1+
From ec40a559327d80f3333c17a1f9e9c516bb073753 Mon Sep 17 00:00:00 2001
22
From: qianlongxu <[email protected]>
3-
Date: Tue, 14 Jan 2025 17:53:31 +0800
3+
Date: Thu, 4 Dec 2025 10:11:52 +0800
44
Subject: [PATCH] skip binary and shared lib and jpeg
55

66
---
7-
CMakeLists.txt | 17 +++++++++++++++--
8-
1 file changed, 15 insertions(+), 2 deletions(-)
7+
CMakeLists.txt | 11 ++++++++++-
8+
1 file changed, 10 insertions(+), 1 deletion(-)
99

1010
diff --git a/CMakeLists.txt b/CMakeLists.txt
11-
index 636531e..47b9759 100644
11+
index 9abfa74..898a6be 100644
1212
--- a/CMakeLists.txt
1313
+++ b/CMakeLists.txt
1414
@@ -5,6 +5,7 @@
1515
PROJECT ( YUV C CXX ) # "C" is required even for C++ projects
16-
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
17-
OPTION( TEST "Built unit tests" OFF )
16+
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.12 )
17+
OPTION( UNIT_TEST "Built unit tests" OFF )
1818
+OPTION( BINARY "Built binary" OFF )
1919

2020
SET ( ly_base_dir ${PROJECT_SOURCE_DIR} )
2121
SET ( ly_src_dir ${ly_base_dir}/source )
22-
@@ -25,22 +26,26 @@ INCLUDE_DIRECTORIES( BEFORE ${ly_inc_dir} )
22+
@@ -29,6 +30,7 @@ endif()
2323
# this creates the static library (.a)
2424
ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} )
2525

2626
+if(BUILD_SHARED_LIBS)
2727
# this creates the shared library (.so)
2828
ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} )
29-
+
3029
SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" )
31-
SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES PREFIX "lib" )
30+
@@ -36,7 +38,9 @@ SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES PREFIX "lib" )
31+
if(WIN32)
32+
SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES IMPORT_PREFIX "lib" )
33+
endif()
3234
+endif()
3335

34-
# this creates the conversion tool
3536
+if(BINARY)
36-
ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc )
37-
TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} )
38-
39-
-
40-
INCLUDE ( FindJPEG )
41-
if (JPEG_FOUND)
42-
include_directories( ${JPEG_INCLUDE_DIR} )
43-
target_link_libraries( yuvconvert ${JPEG_LIBRARY} )
37+
# this creates the cpuid tool
38+
ADD_EXECUTABLE ( cpuid ${ly_base_dir}/util/cpuid.c )
39+
TARGET_LINK_LIBRARIES ( cpuid ${ly_lib_static} )
40+
@@ -55,6 +59,7 @@ if (JPEG_FOUND)
41+
target_link_libraries( ${ly_lib_shared} ${JPEG_LIBRARY} )
4442
add_definitions( -DHAVE_JPEG )
4543
endif()
4644
+endif()
4745

48-
if(TEST)
46+
if(UNIT_TEST)
4947
find_library(GTEST_LIBRARY gtest)
50-
@@ -75,9 +80,17 @@ endif()
48+
@@ -97,10 +102,14 @@ if(UNIT_TEST)
49+
endif()
5150

5251

53-
# install the conversion tool, .so, .a, and all the header files
5452
+if(BINARY)
55-
+message("The BINARY option is enabled.")
56-
INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin )
57-
-INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib )
53+
# install the conversion tool, .so, .a, and all the header files
54+
-INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin )
55+
+INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin )
5856
+endif()
59-
+
57+
INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib )
6058
+if(BUILD_SHARED_LIBS)
61-
+message("The BUILD_SHARED_LIBS option is enabled.")
6259
INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin )
6360
+endif()
64-
+
65-
+INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib )
6661
INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include )
6762

6863
# create the .deb and .rpm packages using cpack
6964
--
70-
2.39.5 (Apple Git-154)
65+
2.50.1 (Apple Git-155)
7166

0 commit comments

Comments
 (0)