From 59cbb4f93391f2ff025a4c5cbb52dfc0076255d9 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 7 Dec 2024 21:17:39 +1100 Subject: [PATCH] Allow libavif to install rav1e on Windows --- .github/workflows/test-windows.yml | 4 ---- winbuild/Findrav1e.cmake | 10 ---------- winbuild/build_prepare.py | 19 ++----------------- 3 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 winbuild/Findrav1e.cmake diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 1430e91e137..fab90454a54 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -139,10 +139,6 @@ jobs: if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\build_dep_libpng.cmd" - - name: Build dependencies / rav1e - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_rav1e.cmd" - - name: Build dependencies / meson if: steps.build-cache.outputs.cache-hit != 'true' run: "& winbuild\\build\\install_meson.cmd" diff --git a/winbuild/Findrav1e.cmake b/winbuild/Findrav1e.cmake deleted file mode 100644 index be1618bd4e7..00000000000 --- a/winbuild/Findrav1e.cmake +++ /dev/null @@ -1,10 +0,0 @@ -file(TO_CMAKE_PATH "${AVIF_RAV1E_ROOT}" RAV1E_ROOT_PATH) -add_library(rav1e::rav1e STATIC IMPORTED GLOBAL) -set_target_properties( - rav1e::rav1e - PROPERTIES IMPORTED_LOCATION "${RAV1E_ROOT_PATH}/lib/rav1e.lib" - AVIF_LOCAL ON - INTERFACE_INCLUDE_DIRECTORIES "${RAV1E_ROOT_PATH}/inc/rav1e" - IMPORTED_SONAME rav1e) -target_link_libraries(rav1e::rav1e INTERFACE ntdll.lib userenv.lib ws2_32.lib - bcrypt.lib) diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 4ebf1f04226..c199d8889b9 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -124,7 +124,6 @@ def cmd_msbuild( "ZLIB": "1.3.1", "MESON": "1.6.0", "LIBAVIF": "1.1.1", - "RAV1E": "0.7.1", } V["LIBPNG_DOTLESS"] = V["LIBPNG"].replace(".", "") V["LIBPNG_XY"] = "".join(V["LIBPNG"].split(".")[:2]) @@ -400,19 +399,6 @@ def cmd_msbuild( ], "bins": [r"*.dll"], }, - "rav1e": { - "url": ( - f"https://github.com/xiph/rav1e/releases/download/v{V['RAV1E']}/FILENAME" - ), - "filename": f"rav1e-{V['RAV1E']}-windows-msvc-generic.zip", - "dir": "rav1e-windows-msvc-sdk", - "license": "LICENSE", - "build": [ - cmd_xcopy("include", "{inc_dir}"), - ], - "bins": [r"bin\*.dll"], - "libs": [r"lib\*.*"], - }, "libavif": { "url": f"https://github.com/AOMediaCodec/libavif/archive/v{V['LIBAVIF']}.zip", "filename": f"libavif-{V['LIBAVIF']}.zip", @@ -435,8 +421,7 @@ def cmd_msbuild( "-DAVIF_CODEC_AOM=LOCAL", "-DAVIF_LIBYUV=LOCAL", "-DAVIF_LIBSHARPYUV=LOCAL", - "-DAVIF_CODEC_RAV1E=SYSTEM", - "-DAVIF_RAV1E_ROOT={build_dir}", + "-DAVIF_CODEC_RAV1E=LOCAL", "-DCMAKE_MODULE_PATH={winbuild_dir_cmake}", "-DAVIF_CODEC_DAV1D=LOCAL", "-DAVIF_CODEC_SVT=LOCAL", @@ -804,7 +789,7 @@ def main() -> None: if args.no_fribidi: disabled += ["fribidi"] if args.no_avif or args.architecture != "AMD64": - disabled += ["rav1e", "libavif"] + disabled += ["libavif"] prefs = { "architecture": args.architecture,