Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ option(BUILD_FFMPEG_VULKAN_PATCHES "Apply FFmpeg Vulkan patches" ON)

# common includes
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/apply_git_patch.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/git_fetch_tags.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/unix_path.cmake)

# CPM
Expand Down
9 changes: 0 additions & 9 deletions cmake/ffmpeg/_main.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# x265.pc will not be installed if their cmake cannot detect the latest tag
# SVT-AV1 cannot determine version if the git history is not available
foreach(repo "x265_git" "SVT-AV1")
execute_process(
COMMAND git -C "${CMAKE_CURRENT_SOURCE_DIR}/third-party/FFmpeg/${repo}" fetch --tags --depth=1
COMMAND_ERROR_IS_FATAL ANY
)
endforeach()

# the destination directory needs to be same level down as the original source directory
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/third-party/FFmpeg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
PATTERN "Vulkan-Loader/tests" EXCLUDE) # vulkan loader test files contain emojis in file names which can fail
Expand Down
3 changes: 3 additions & 0 deletions cmake/ffmpeg/svt_av1.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SVT-AV1 cannot determine version if the git history is not available
GIT_FETCH_TAGS("third-party/FFmpeg/SVT-AV1")

set(SVT_AV1_GENERATED_SRC_PATH ${CMAKE_CURRENT_BINARY_DIR}/FFmpeg/SVT-AV1)

if(BUILD_FFMPEG_ALL_PATCHES OR BUILD_FFMPEG_SVT_AV1_PATCHES)
Expand Down
3 changes: 3 additions & 0 deletions cmake/ffmpeg/x265.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# x265.pc will not be installed if their cmake cannot detect the latest tag
GIT_FETCH_TAGS("third-party/FFmpeg/x265_git")

set(X265_GENERATED_SRC_PATH ${CMAKE_CURRENT_BINARY_DIR}/FFmpeg/x265_git)

file(GLOB X265_GIT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/patches/FFmpeg/x265_git/*.patch)
Expand Down
10 changes: 10 additions & 0 deletions cmake/git_fetch_tags.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This macro fetches tags for the given git repository
# Arguments are path to git repository

# GIT_FETCH_TAGS: args = `repo_path`
macro(GIT_FETCH_TAGS repo_path)
execute_process(
COMMAND git -C "${CMAKE_CURRENT_SOURCE_DIR}/${repo_path}" fetch --tags --depth=1
COMMAND_ERROR_IS_FATAL ANY
)
endmacro()