Skip to content

Commit

Permalink
Add Visual Studio 2019 x64 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
DJATOM committed Mar 17, 2021
1 parent 3dbf9c1 commit 4c4aee0
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build/vc16-x86_64/build-all.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@echo off
if "%VS160COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 16 not detected"
exit 1
)
if not exist x265.sln (
call make-solutions.bat
)
if exist x265.sln (
call "%VS160COMNTOOLS%\..\..\VC\vcvarsall.bat"
MSBuild /property:Configuration="Release" x265.sln
MSBuild /property:Configuration="Debug" x265.sln
MSBuild /property:Configuration="RelWithDebInfo" x265.sln
)
6 changes: 6 additions & 0 deletions build/vc16-x86_64/make-solutions.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
::
:: run this batch file to create a Visual Studio solution file for this project.
:: See the cmake documentation for other generator targets
::
cmake -G "Visual Studio 16" ..\..\source && cmake-gui ..\..\source
44 changes: 44 additions & 0 deletions build/vc16-x86_64/multilib.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@echo off
if "%VS160COMNTOOLS%" == "" (
msg "%username%" "Visual Studio 16 not detected"
exit 1
)

call "%VS160COMNTOOLS%\..\..\VC\vcvarsall.bat"

@mkdir 12bit
@mkdir 10bit
@mkdir 8bit

@cd 12bit
cmake -G "Visual Studio 16" -A x64 ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
copy/y Release\x265-static.lib ..\8bit\x265-static-main12.lib
)

@cd ..\10bit
cmake -G "Visual Studio 16" -A x64 ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
copy/y Release\x265-static.lib ..\8bit\x265-static-main10.lib
)

@cd ..\8bit
if not exist x265-static-main10.lib (
msg "%username%" "10bit build failed"
exit 1
)
if not exist x265-static-main12.lib (
msg "%username%" "12bit build failed"
exit 1
)
cmake -G "Visual Studio 16" -A x64 ../../../source -DEXTRA_LIB="x265-static-main10.lib;x265-static-main12.lib" -DLINKED_10BIT=ON -DLINKED_12BIT=ON
if exist x265.sln (
MSBuild /property:Configuration="Release" x265.sln
:: combine static libraries (ignore warnings caused by winxp.cpp hacks)
move Release\x265-static.lib x265-static-main.lib
LIB.EXE /ignore:4006 /ignore:4221 /OUT:Release\x265-static.lib x265-static-main.lib x265-static-main10.lib x265-static-main12.lib
)

pause

0 comments on commit 4c4aee0

Please sign in to comment.