@@ -168,8 +168,8 @@ https://github.com/mrts/docker-qt-cmake-gtest-valgrind-ubuntu/blob/master/Docker
168168
169169 .\vcpkg install --recurse --triplet x64-windows --clean-after-build gtest openssl
170170
171- - Install _ Qt_ with the official [ _ Qt Online Installer_ ] ( https://www.qt.io/download-qt-installer ) , choose _ Default Qt 5.15 desktop installation _ .
172- Export _ Qt _ directory with e.g. ` set Qt5_DIR=C:\qt ` before building .
171+ - Install _ Qt_ with the official [ _ Qt Online Installer_ ] ( https://www.qt.io/download-qt-installer ) ,
172+ choose _ Custom installation > Qt 5.15.2 > MSVC 2019 64-bit _ .
173173
174174### macOS
175175
@@ -194,3 +194,44 @@ https://github.com/mrts/docker-qt-cmake-gtest-valgrind-ubuntu/blob/master/Docker
194194 ./build.sh
195195 ./test.sh
196196 ./build/src/app/web-eid -c get-certificate '{"type":"auth", "origin":"https://ria.ee"}'
197+
198+ ### Building and testing in Windows
199+
200+ Use _ Powershell_ to run the following commands to build the project.
201+
202+ - Set the _ Qt_ installation directory variable:
203+
204+ $QT_ROOT = "C:\Qt\5.15.2\msvc2019_64"
205+
206+ - Set the _ Qt_ _ CMake_ directory environment variable:
207+
208+ $env:Qt5_DIR = "${QT_ROOT}\lib\cmake\Qt5"
209+
210+ - Set the _ vcpkg_ installation directory variable:
211+
212+ $VCPKG_ROOT = "C:\vcpkg"
213+
214+ - Set the build type variable:
215+
216+ $BUILD_TYPE = "RelWithDebInfo"
217+
218+ - Make the build directory and run _ CMake_ :
219+
220+ mkdir build
221+ cd build
222+ cmake -A x64 `
223+ "-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" `
224+ "-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" ..
225+
226+ - Run the build and installer build:
227+
228+ cmake --build . --config ${BUILD_TYPE}
229+ cmake --build . --config ${BUILD_TYPE} --target installer
230+
231+ - Add _ Qt_ binary directory to path:
232+
233+ $env:PATH += "${QT_ROOT}\bin"
234+
235+ - Run tests:
236+
237+ ctest -V -C ${BUILD_TYPE}
0 commit comments