diff --git a/build/ffmpeg/ffmpeg.vcxproj b/build/ffmpeg/ffmpeg.vcxproj
index a0ef8a80a..d799f10fa 100644
--- a/build/ffmpeg/ffmpeg.vcxproj
+++ b/build/ffmpeg/ffmpeg.vcxproj
@@ -11,6 +11,9 @@
+
+
+
@@ -56,70 +59,12 @@
$(FfmpegSrcDir)\
+ %(Include) -I$(MSBuildThisFileDirectory) -I$(MSBuildThisFileDirectory)$(FfmpegSrcDir)
+ %(Config) -DPREFIX -Pconfig-x86.asm
+ %(Config) -Pconfig-x64.asm
-
-
- _YasmAssemble;
- $(BuildCompileTargets)
-
-
-
-
-
-
- %(Yasm.RelativeDir)
- $(InputRelativeDir.Replace("%(Yasm.InputRelativeSourceDir)",""))
- %(Yasm.InputRelativeSourceDir)
- $(InputRelativeSourceDir)\
- $(InputRelativeDir.Replace("$(InputRelativeSourceDir)",""))
-
-
-
- $(AegisubObjectDir)$(InputRelativeDir)
-
-
-
-
-
-
-
-
- -I. -I$(MSBuildThisFileDirectory) -I$(FfmpegSrcDir) -I%(Yasm.RootDir)%(Yasm.Directory)
- @(Yasm -> '%(OutputDir)%(Filename)').obj
- -m x86 -DPREFIX -Pconfig-x86.asm
- -m amd64 -Pconfig-x64.asm
-
-
-
-
-
-
-
-
-
diff --git a/build/yasm.targets b/build/yasm.targets
new file mode 100644
index 000000000..bacd151e6
--- /dev/null
+++ b/build/yasm.targets
@@ -0,0 +1,101 @@
+
+
+
+
+ <_PropertySheetDisplayName>Yasm compile targets
+
+
+
+
+ _YasmAssemble;
+ $(BuildCompileTargets)
+
+
+
+
+
+
+ false
+ -m x86
+ -m amd64
+
+
+
+
+
+
+
+
+
+
+
+
+ <_Yasm Include="@(Yasm)" Condition="'%(Yasm.InputRelativeSourceDir)' == ''">
+
+
+
+ <_Yasm Remove="@(_Yasm->WithMetadataValue('ExcludeFromBuild','true'))" />
+
+
+
+
+ <_Yasm>
+ %(Include) -I%(RootDir)%(Directory)
+
+ %(OutputDir)
+ $(AegisubObjectDir)%(OutputDir)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+