The project was tested on Windows 10 with Visual Studio 2017. Currently only s3d_decklink has not been implemented for Windows and is replaced by a fake capture device that does nothing.
- Clone OpenCV Github
- Clone OpenCV Contrib Github
cd opencv
mkdir build
cd build
cmake .. -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules -G "Visual Studio 15 2017" :: use the compiler you wish to use here
Build OpenCV using Visual Studio in Debug + Release.
Building INSTALL
project will create an install
folder which you can copy directly to <OpenS3D>/src/deps/opencv
.
The procedure was inspired from this one.
- Download the "dev" and "shared" x86 versions from here.
- Create a
<OpenS3D>/src/deps/ffmpeg/x86
folder. - Copy the
bin
folder from the "shared" FFMPEG into<OpenS3D>/src/deps/ffmpeg/x86
. - Copy the
include
andlib
folder from the "dev" FFMPEG into<OpenS3D>/src/deps/ffmpeg/x86
. - In
<OpenS3D>/src/deps/ffmpeg/x86/lib
, create the appropriate MSVC.lib
to load the.dll
from the.def
usinglib /machine:i386 /def:thedllname.def
(FFmpeg was built with MinGW and we want to load the .dll with Visual Studio) See: this and that. - Replace the original FFmpeg .lib with the generated ones for Visual Studio (i.e: delete swscale.lib, rename swscale-5.lib -> swscale.lib)
- Download Qt
- Install Qt from downloaded executable for your compiler (to C:/Qt)
Navigate to <OpenS3D>/src/scripts
and run generate-project.bat
which will set the appropriate environment variables and generate the Visual Studio Project using CMake (default is "Visual Studio 15 2017").
For now, to run the built code, FFmpeg and OpenCV .dll
have to be added to the path (see /src/scripts/set-environment.bat). Alternatively, you may run set-environment.bat
from the command line before running the program from the same command line. Eventually, these .dll
should be copied to the build directory.