Skip to content

fix(core): restore MSVC build

Flavien BRIDAULT requested to merge 702-core-restore-msvc-build into dev

Description

Windows support is back! Third-part libraries are now built with vcpkg instead of Conan. We found out that vcpkg packages are much more stable and most of all, coherency is ensured between packages.

Few fixes were brought to support the newest version of these libraries. Indeed they are often more recent than Ubuntu packages.

Doing this, the GitLab CI/CD scripts were updated to use Powershell instead of cmd, as recommended by GitLab.

Closes #702 (closed) #517 (closed)

How to test it?

In your build folder, before running cmake, you must first download binary packages using:

cmake -P <path>\sight\cmake\build\download_deps.cmake

This will create a folder in the parent directory named sight-vcpkg-<sha1>, where <sha1> is the commit used to create the export from the sight-vcpkg repository.

Then you can run cmake, but you need to specify the vcpkg toolchain:

cmake -DCMAKE_TOOLCHAIN_FILE=..\sight-vcpkg-<sha1>\scripts\buildsystems\vcpkg.cmake

If you use VSCode, you can put that toolchain directly in your settings:

"cmake.configureArgs": [
  "-DCMAKE_TOOLCHAIN_FILE=..\\sight-vcpkg-<sha1>\\scripts\\buildsystems\\vcpkg.cmake"
]

If you want to download binary packages elsewhere, you can specify it with the OUTPUT variable:

cmake -DOUTPUT=alternative/path/to/sight-vcpkg -P <path>\sight\cmake\build\download_deps.cmake

Then, run ninja as usual. You can then test apps and tutorials.

Known issues

Edited by Flavien BRIDAULT

Merge request reports