Skip to content

Commit

Permalink
Use cmds_cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 9, 2024
1 parent 524d802 commit 1cf88a1
Showing 1 changed file with 10 additions and 27 deletions.
37 changes: 10 additions & 27 deletions winbuild/build_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,35 +405,19 @@ def cmd_msbuild(
"dir": f"libavif-{V['LIBAVIF']}",
"license": "LICENSE",
"build": [
cmd_mkdir("build.pillow"),
cmd_cd("build.pillow"),
" ".join(
[
"{cmake}",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_VERBOSE_MAKEFILE=ON",
"-DCMAKE_RULE_MESSAGES:BOOL=OFF",
"-DCMAKE_C_COMPILER=cl.exe",
"-DCMAKE_CXX_COMPILER=cl.exe",
"-DCMAKE_C_FLAGS=-nologo",
"-DCMAKE_CXX_FLAGS=-nologo",
"-DBUILD_SHARED_LIBS=OFF",
"-DAVIF_CODEC_AOM=LOCAL",
"-DAVIF_LIBYUV=LOCAL",
"-DAVIF_LIBSHARPYUV=LOCAL",
"-DAVIF_CODEC_RAV1E=LOCAL",
"-DCMAKE_MODULE_PATH={winbuild_dir_cmake}",
"-DAVIF_CODEC_DAV1D=LOCAL",
"-DAVIF_CODEC_SVT=LOCAL",
'-G "Ninja"',
"..",
]
*cmds_cmake(
"avif_static",
"-DBUILD_SHARED_LIBS=OFF",
"-DAVIF_CODEC_AOM=LOCAL",
"-DAVIF_LIBYUV=LOCAL",
"-DAVIF_LIBSHARPYUV=LOCAL",
"-DAVIF_CODEC_RAV1E=LOCAL",
"-DAVIF_CODEC_DAV1D=LOCAL",
"-DAVIF_CODEC_SVT=LOCAL",
),
"ninja -v",
cmd_cd(".."),
cmd_xcopy("include", "{inc_dir}"),
],
"libs": [r"build.pillow\avif.lib"],
"libs": ["avif.lib"],
},
}

Expand Down Expand Up @@ -796,7 +780,6 @@ def main() -> None:
**arch_prefs,
# Pillow paths
"winbuild_dir": winbuild_dir,
"winbuild_dir_cmake": winbuild_dir.replace("\\", "/"),
# Build paths
"bin_dir": bin_dir,
"build_dir": args.build_dir,
Expand Down

0 comments on commit 1cf88a1

Please sign in to comment.