Skip to content

Commit 56f4391

Browse files
committed
cmake: Adapt upstream script for RPCS3
1 parent b4d5676 commit 56f4391

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

CMakeLists.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,22 @@ execute_process(
3838
OUTPUT_STRIP_TRAILING_WHITESPACE)
3939

4040
# Download prebuilt ffmpeg
41-
if(NOT EXISTS "${CMAKE_BINARY_DIR}/external/ffmpeg.zip")
41+
if(NOT EXISTS "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg.zip")
4242
message(STATUS "Downloading FFMPEG prebuilts...")
43-
file(DOWNLOAD https://github.com/Vita3K/ffmpeg-core/releases/download/${FFMPEG_GIT_SHA}/${FFMPEG_PREBUILTS_NAME}
44-
"${CMAKE_BINARY_DIR}/external/ffmpeg.zip" SHOW_PROGRESS
43+
file(DOWNLOAD https://github.com/RPCS3/ffmpeg-core/releases/download/${FFMPEG_GIT_SHA}/${FFMPEG_PREBUILTS_NAME}
44+
"${CMAKE_BINARY_DIR}/3rdparty/ffmpeg.zip" SHOW_PROGRESS
4545
STATUS FILE_STATUS)
4646
list(GET FILE_STATUS 0 STATUS_CODE)
4747
if (NOT STATUS_CODE EQUAL 0)
48-
file(REMOVE "${CMAKE_BINARY_DIR}/external/ffmpeg.zip") # CMake create 0 byte file even if URL is invalid. So need to delete it.
48+
file(REMOVE "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg.zip") # CMake create 0 byte file even if URL is invalid. So need to delete it.
4949
message(FATAL_ERROR "No FFMPEG prebuilt found with corresponding commit SHA (${FFMPEG_GIT_SHA})")
5050
endif()
5151
endif()
5252

53-
if(NOT EXISTS "${CMAKE_BINARY_DIR}/external/ffmpeg/lib")
54-
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/external/ffmpeg/lib")
55-
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${CMAKE_BINARY_DIR}/external/ffmpeg.zip"
56-
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/external/ffmpeg/lib")
53+
if(NOT EXISTS "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib")
54+
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib")
55+
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg.zip"
56+
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib")
5757
endif()
5858

5959
set(LIB_PREFIX "lib")
@@ -71,9 +71,9 @@ elseif (APPLE)
7171
endif ()
7272

7373
target_link_libraries(${FFMPEG_CORE_NAME} INTERFACE
74-
"${CMAKE_BINARY_DIR}/external/ffmpeg/lib/${LIB_PREFIX}avformat.${LIB_EXT}"
75-
"${CMAKE_BINARY_DIR}/external/ffmpeg/lib/${LIB_PREFIX}avcodec.${LIB_EXT}"
76-
"${CMAKE_BINARY_DIR}/external/ffmpeg/lib/${LIB_PREFIX}swscale.${LIB_EXT}"
77-
"${CMAKE_BINARY_DIR}/external/ffmpeg/lib/${LIB_PREFIX}avutil.${LIB_EXT}"
78-
"${CMAKE_BINARY_DIR}/external/ffmpeg/lib/${LIB_PREFIX}avfilter.${LIB_EXT}"
79-
"${CMAKE_BINARY_DIR}/external/ffmpeg/lib/${LIB_PREFIX}swresample.${LIB_EXT}")
74+
"${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib/${LIB_PREFIX}avformat.${LIB_EXT}"
75+
"${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib/${LIB_PREFIX}avcodec.${LIB_EXT}"
76+
"${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib/${LIB_PREFIX}swscale.${LIB_EXT}"
77+
"${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib/${LIB_PREFIX}avutil.${LIB_EXT}"
78+
"${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib/${LIB_PREFIX}avfilter.${LIB_EXT}"
79+
"${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib/${LIB_PREFIX}swresample.${LIB_EXT}")

0 commit comments

Comments
 (0)