Skip to content

Commit 23079c0

Browse files
committed
fix(ffmpeg): only do git fetch for dependencies we're actually building
Gentoo uses the system-wide versions, so these directories are empty, causing git to fail. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
1 parent cee2d5d commit 23079c0

3 files changed

Lines changed: 12 additions & 9 deletions

File tree

cmake/ffmpeg/_main.cmake

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
# x265.pc will not be installed if their cmake cannot detect the latest tag
2-
# SVT-AV1 cannot determine version if the git history is not available
3-
foreach(repo "x265_git" "SVT-AV1")
4-
execute_process(
5-
COMMAND git -C "${CMAKE_CURRENT_SOURCE_DIR}/third-party/FFmpeg/${repo}" fetch --tags --depth=1
6-
COMMAND_ERROR_IS_FATAL ANY
7-
)
8-
endforeach()
9-
101
# the destination directory needs to be same level down as the original source directory
112
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/third-party/FFmpeg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
123
PATTERN "Vulkan-Loader/tests" EXCLUDE) # vulkan loader test files contain emojis in file names which can fail

cmake/ffmpeg/svt_av1.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# SVT-AV1 cannot determine version if the git history is not available
2+
execute_process(
3+
COMMAND git -C "${CMAKE_CURRENT_SOURCE_DIR}/third-party/FFmpeg/SVT-AV1" fetch --tags --depth=1
4+
COMMAND_ERROR_IS_FATAL ANY
5+
)
6+
17
set(SVT_AV1_GENERATED_SRC_PATH ${CMAKE_CURRENT_BINARY_DIR}/FFmpeg/SVT-AV1)
28

39
if(BUILD_FFMPEG_ALL_PATCHES OR BUILD_FFMPEG_SVT_AV1_PATCHES)

cmake/ffmpeg/x265.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# x265.pc will not be installed if their cmake cannot detect the latest tag
2+
execute_process(
3+
COMMAND git -C "${CMAKE_CURRENT_SOURCE_DIR}/third-party/FFmpeg/x265_git" fetch --tags --depth=1
4+
COMMAND_ERROR_IS_FATAL ANY
5+
)
6+
17
set(X265_GENERATED_SRC_PATH ${CMAKE_CURRENT_BINARY_DIR}/FFmpeg/x265_git)
28

39
file(GLOB X265_GIT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/patches/FFmpeg/x265_git/*.patch)

0 commit comments

Comments
 (0)