- MSVC (native)
- MinGW cross-compile
Requirements
- Visual Studio 2019 or later (any edition, including Build Tools)
- CMake >= 3.13
- Ninja (bundled with Visual Studio, or install separately)
- A pre-built OpenSSL distribution for Windows (e.g. from Shining Light or vcpkg)
Opening a developer prompt
All CMake commands must be run inside a Visual Studio Developer Command Prompt, or from a standardcmd/PowerShell session that has already sourced vcvarsall.bat:Build
CI preload configuration
The repository shipsci/cmake-preloads/config-windows.txt with recommended Windows settings:Notable Windows flags
| Flag | Description |
|---|---|
BUILD_SHARED_LIBS=OFF | Produce a statically linked executable. |
OPENSSL_USE_STATIC_LIBS=ON | Link OpenSSL statically. |
CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded | Use the static MSVC runtime (/MT). |
WITH_WIN_CONSOLE=ON | Attach a console window to the client executable. |
WITH_SHADOW=OFF | Disable the shadow server (not supported on Windows). |
WITH_CLIENT_SDL=ON | Build the SDL2 client. |
WITH_SDL_LINK_SHARED=OFF | Link SDL2 statically. |
ZLIB_USE_STATIC_LIBS=ON | Link zlib statically. |
