Skip to content

For Windows

Sébastien Gallou edited this page Feb 12, 2026 · 80 revisions

Tools needed

Tool Minimal version Recommended version Testing
Microsoft Visual Studio 2017 (v15), 2019 (v16) 2022 (v17) -

Libraries needed

Library Installation/Compilation
Boost BOOST_ROOT environment variable must point to Boost path. Some libraries must be compiled, see Cmake report
Poco POCO_ROOT environment variable must point to Boost path.
Protobuf PROTOBUF_ROOT environment variable must point to Protobuf path.
OpenSSL OPENSSL_ROOT environment variable must point to OpenSSL path.

Refer to the How to build from sources page to get official versions of dependencies.

Boost

Go to boost.org, download boost and extract it.

bootstrap.bat & b2.exe --with-atomic --with-chrono --with-date_time --with-filesystem --with-locale --with-process --with-regex --with-system --with-test --with-thread link=static runtime-link=static --prefix=D:/dev/boost install

Output libraries should be found in stage folder.

Then, our cmake needs to know the BOOST_ROOT folder. There are two ways to do it:

  1. Either : create the BOOST_ROOT environment variable
  2. Or : edit/add the file "sources/CMakeListsUserConfig.txt" by adding such a line : set(BOOST_ROOT "D:/dev/boost")

OpenSSL

OpenSSL must be installed before Poco.

** Tested version is 3.6.0 - 32 bits **

  1. Install OpenSSL (full version) available here : https://slproweb.com/products/Win32OpenSSL.html .

  2. Build Poco (see below).

  3. Tell Yadoms where to find OpenSSL setting install folder into the Yadoms file "sources/CMakeListsUserConfig.txt", by adding such a line :

set(OPENSSL_ROOT "<path_to>/OpenSSL-Win32")

Poco

  1. Download the Poco Complete edition (-all) and extract it.

  2. Open a terminal in extracted folder, an type (update openSSL path and install prefix) :

cmake -S . -B build -DOPENSSL_ROOT_DIR="<path_to_>/OpenSSL-Win32" -DENABLE_JSON=OFF -DENABLE_MONGODB=OFF -DENABLE_DATA_SQLITE=OFF -DENABLE_REDIS=OFF -DENABLE_PROMETHEUS=OFF -DENABLE_PDF=OFF -DENABLE_SEVENZIP=OFF -DENABLE_CPPPARSER=OFF -DENABLE_POCODOC=OFF -DENABLE_PAGECOMPILER=OFF -DENABLE_PAGECOMPILER_FILE2PAGE=OFF -DENABLE_ACTIVERECORD=OFF -DENABLE_ACTIVERECORD_COMPILER=OFF -DBUILD_SHARED_LIBS=OFF -DPOCO_MT=ON -A Win32 -DCMAKE_INSTALL_PREFIX=D:/dev/poco
  1. Build Debug and Release libraries
cmake --build build --config Debug -j %NUMBER_OF_PROCESSORS%
cmake --build build --config Release -j %NUMBER_OF_PROCESSORS%
cmake --install build --config Debug
cmake --install build --config Release
  1. Tell Yadoms where to find Poco install folder into the Yadoms file "sources/CMakeListsUserConfig.txt", by adding such a line :
set(POCO_ROOT "D:/dev/poco")

Protobuf

Download protobuf-cpp-3.15.8.zip

Unzip it and build :

cmake -S cmake -B prj -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_DISABLE_RTTI=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=D:/dev/protobuf -A Win32
cmake --build prj --config Debug -j %NUMBER_OF_PROCESSORS%
cmake --install prj --config Debug
cmake --build prj --config Release -j %NUMBER_OF_PROCESSORS%
cmake --install prj --config Release

TODO ménage

Download protobuf-**.*.zip sources here : https://github.com/google/protobuf/releases

Unzip it and build :

cmake -S . -B build -DBUILD_SHARED_LIBS=OFF -Dprotobuf_DISABLE_RTTI=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=D:/dev/protobuf -A Win32
cmake --build build --config Debug -j %NUMBER_OF_PROCESSORS%
cmake --install build --config Debug
cmake --build build --config Release -j %NUMBER_OF_PROCESSORS%
cmake --install build --config Release

Tell Yadoms where to find Protobuf install folder into the Yadoms file "sources/CMakeListsUserConfig.txt", by adding such a line :

set(PROTOBUF_ROOT "D:/dev/protobuf")

Python (optional, needed by python script interpreter)

  1. Download the latest 3.x version of python 32bits only https://www.python.org/downloads/

  2. Install python

  3. Tell Yadoms where to find python setting install folder into the Yadoms file "sources/CMakeListsUserConfig.txt", by adding such a line :

set(PYTHON_ROOT "C:\Python3\")

Swig (optional, needed by python script interpreter)

  1. Download the last version of swig (3.0.5 at the document redaction)

  2. Extract the package into a directory

  3. Tell Yadoms where to find Swig setting install folder into the Yadoms file "sources/CMakeListsUserConfig.txt", by adding such a line :

set(SWIG_ROOT "D:/dev/swigwin/")

OpenCV (optional, needed by some plugins)

  1. Download the latest sources from here

  2. Generate the solution using cmake

cd opencv-<version>
mkdir build
cd build
cmake.exe -DWITH_EIGEN:BOOL="0" -DWITH_IMGCODEC_HDR:BOOL="0" -DBUILD_opencv_ts:BOOL="0" -DBUILD_opencv_video:BOOL="0" -DWITH_TIFF:BOOL="0" -DBUILD_PACKAGE:BOOL="0" -DBUILD_opencv_features2d:BOOL="0" -DBUILD_ITT:BOOL="0" -Dthunder:BOOL="0" -Dlzw:BOOL="0" -DCV_TRACE:BOOL="0" -DWITH_MSMF:BOOL="0" -DWITH_FFMPEG:BOOL="0" -DWITH_IMGCODEC_PXM:BOOL="0" -DWITH_MSMF_DXVA:BOOL="0" -DCPACK_SOURCE_ZIP:BOOL="0" -Dpackbits:BOOL="0" -DBUILD_opencv_apps:BOOL="0" -DBUILD_PROTOBUF:BOOL="0" -DBUILD_opencv_objdetect:BOOL="0" -DBUILD_IPP_IW:BOOL="0" -DBUILD_opencv_videoio:BOOL="0" -DBUILD_PERF_TESTS:BOOL="0" -Dmdi:BOOL="0" -DWITH_1394:BOOL="0" -DINSTALL_PDB:BOOL="0" -DWITH_OPENCL:BOOL="0" -DM_LIBRARY:FILEPATH="M_LIBRARY-NOTFOUND" -DUSE_WIN32_FILEIO:BOOL="1" -DCPACK_SOURCE_7Z:BOOL="0" -DBUILD_opencv_stitching:BOOL="0" -Dccitt:BOOL="0" -DVIDEOIO_ENABLE_STRICT_PLUGIN_CHECK:BOOL="0" -DWITH_IPP:BOOL="0" -DBUILD_opencv_dnn:BOOL="0" -DWITH_ITT:BOOL="0" -DCPACK_BINARY_NSIS:BOOL="0" -DBUILD_opencv_photo:BOOL="0" -DBUILD_opencv_calib3d:BOOL="0" -DWITH_QUIRC:BOOL="0" -DWITH_WEBP:BOOL="0" -DBUILD_opencv_python_bindings_generator:BOOL="0" -DWITH_PROTOBUF:BOOL="0" -DBUILD_JASPER:BOOL="1" -DWITH_OPENCLAMDBLAS:BOOL="0" -DBUILD_JAVA:BOOL="0" -DWITH_VTK:BOOL="0" -DBUILD_opencv_java_bindings_generator:BOOL="0" -DBUILD_opencv_highgui:BOOL="0" -DWITH_ARITH_DEC:BOOL="0" -DWITH_IMGCODEC_SUNRASTER:BOOL="0" -DWITH_ADE:BOOL="0" -DBUILD_OPENEXR:BOOL="0" -DWITH_OPENEXR:BOOL="0" -DWITH_OPENCLAMDFFT:BOOL="0" -DVIDEOIO_ENABLE_PLUGINS:BOOL="0" -DWITH_DSHOW:BOOL="0" -DOPENCV_DNN_OPENCL:BOOL="0" -DWITH_LAPACK:BOOL="0" -DWITH_IMGCODEC_PFM:BOOL="0" -Dlogluv:BOOL="0" -DINSTALL_PDB_COMPONENT_EXCLUDE_FROM_ALL:BOOL="0" -DBUILD_opencv_ml:BOOL="0" -DOPENCV_ENABLE_MEMALIGN:BOOL="0" -DBUILD_opencv_python_tests:BOOL="0" -DCV_ENABLE_INTRINSICS:BOOL="0" -DOPENCL_FOUND:BOOL="0" -DWITH_OPENCL_D3D11_NV:BOOL="0" -Dnext:BOOL="0" -DBUILD_opencv_gapi:BOOL="0" -DBUILD_opencv_flann:BOOL="0" -DBUILD_TESTS:BOOL="0" -DWITH_DIRECTX:BOOL="0" -DCMAKE_BUILD_TYPE=RELEASE -A Win32 .. -j %NUMBER_OF_PROCESSORS%
  1. Open the solution build\OpenCV.sln using Visual Studio

  2. Change the build mode to Release instead of Debug

  3. Set ALL_build solution as startup project

  4. Build the solution

  5. Right-click on INSTALL solution and build it

  6. Tell Yadoms where to find OpenCV into the Yadoms file "sources/CMakeListsUserConfig.txt", by adding such a line :

set(OPENCV_ROOT "D:/dev/opencv-<version>/build/install")

PostgreSQL (optional, if you want use PostgreSQL instead of SQLite as database engine)

  1. Download the last version of PostgreSQL (9.6.1 at the document redaction). Choose the 32-bits version.

  2. Extract the package into a directory

  3. Tell Yadoms where to find PostgreSQL setting install folder into the Yadoms file "sources/CMakeListsUserConfig.txt", by adding such a line :

set(PostgreSQL_ROOT "D:/dev/pgsql")
  1. Set PostgreSQL parameters in yadoms.ini file (in the Yadoms binary folder after Yadoms build)

Build

First build the Visual Studio solution, by running our batch file :

cmake_windows.cmd

The projects and solution are generated in the projects folder. To build, you can open projects/yadoms.sln with your IDE, or use this command line (from projects folder) :

cmake --build . --config Release -j %NUMBER_OF_PROCESSORS%

Replace Release by Debug to build debug version.

Binaries will be written into builds folder.

Debug

Change the working directory in the debugger properties of the project yadoms by :

$(TargetDir)

Clone this wiki locally