Skip to content

Commit 4af56ad

Browse files
committed
Fix ?
1 parent 02a998d commit 4af56ad

File tree

1 file changed

+36
-34
lines changed

1 file changed

+36
-34
lines changed

src/torchcodec/_core/fetch_and_expose_non_gpl_ffmpeg_libs.cmake

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,42 @@ set(
1414
https://pytorch.s3.amazonaws.com/torchcodec/ffmpeg/2025-03-14
1515
)
1616

17+
18+
19+
FetchContent_Declare(
20+
f4
21+
URL ${platform_url}/4.4.4.tar.gz
22+
URL_HASH
23+
SHA256=${f4_sha256}
24+
)
25+
FetchContent_Declare(
26+
f5
27+
URL ${platform_url}/5.1.4.tar.gz
28+
URL_HASH
29+
SHA256=${f5_sha256}
30+
)
31+
FetchContent_Declare(
32+
f6
33+
URL ${platform_url}/6.1.1.tar.gz
34+
URL_HASH
35+
SHA256=${f6_sha256}
36+
)
37+
FetchContent_Declare(
38+
f7
39+
URL ${platform_url}/7.0.1.tar.gz
40+
URL_HASH
41+
SHA256=${f7_sha256}
42+
)
43+
44+
FetchContent_MakeAvailable(f4 f5 f6 f7)
45+
46+
add_library(ffmpeg4 INTERFACE)
47+
add_library(ffmpeg5 INTERFACE)
48+
add_library(ffmpeg6 INTERFACE)
49+
add_library(ffmpeg7 INTERFACE)
50+
51+
# Note: the f?_SOURCE_DIR variables were set by FetchContent_MakeAvailable
52+
1753
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
1854
set(
1955
platform_url
@@ -205,40 +241,6 @@ else()
205241
"Unsupported operating system: ${CMAKE_SYSTEM_NAME}"
206242
)
207243
endif()
208-
209-
FetchContent_Declare(
210-
f4
211-
URL ${platform_url}/4.4.4.tar.gz
212-
URL_HASH
213-
SHA256=${f4_sha256}
214-
)
215-
FetchContent_Declare(
216-
f5
217-
URL ${platform_url}/5.1.4.tar.gz
218-
URL_HASH
219-
SHA256=${f5_sha256}
220-
)
221-
FetchContent_Declare(
222-
f6
223-
URL ${platform_url}/6.1.1.tar.gz
224-
URL_HASH
225-
SHA256=${f6_sha256}
226-
)
227-
FetchContent_Declare(
228-
f7
229-
URL ${platform_url}/7.0.1.tar.gz
230-
URL_HASH
231-
SHA256=${f7_sha256}
232-
)
233-
234-
FetchContent_MakeAvailable(f4 f5 f6 f7)
235-
236-
add_library(ffmpeg4 INTERFACE)
237-
add_library(ffmpeg5 INTERFACE)
238-
add_library(ffmpeg6 INTERFACE)
239-
add_library(ffmpeg7 INTERFACE)
240-
241-
# Note: the f?_SOURCE_DIR variables were set by FetchContent_MakeAvailable
242244
target_include_directories(ffmpeg4 INTERFACE ${f4_SOURCE_DIR}/include)
243245
target_include_directories(ffmpeg5 INTERFACE ${f5_SOURCE_DIR}/include)
244246
target_include_directories(ffmpeg6 INTERFACE ${f6_SOURCE_DIR}/include)

0 commit comments

Comments
 (0)