Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Visual Studio 2019 #19

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 2019" ..\..\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 Win64" ../../../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 Win64" ../../../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 Win64" ../../../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