-
Notifications
You must be signed in to change notification settings - Fork 121
Build Instructions for Windows
Note
This page applies to the in-development new build system. For current build instructions, see here.
ares on Windows can be built either via the default Windows shell, or within an MSYS2/MinGW environment.
- Windows 10 or higher
- CMake 3.28 or higher
- Git for Windows
- Visual Studio 17 2022
Ensure that the "Desktop Development with C++" package is included in your Visual Studio 2022 installation. Building ares with clang also requires that the "C++ Clang tools for Windows" package is installed.
First, clone the ares repository:
git clone https://github.com/ares-emulator/ares
cd ares
A Visual Studio project can be setup by using the windows
CMake preset:
cmake --preset windows
This preset will generate a Visual Studio project for ares using Clang-CL that will build all targets and package dependencies appropriately.
If you prefer to use the MSVC compiler, specify the windows-msvc
preset:
cmake --preset windows-msvc
Visual Studio presets will generate single-architecture configuration with the host architecture will be created; if you would like to compile for a specific architecture, you may specify -A x64
or -A arm64
as appropriate. Multi-architecture configuration is not supported. 32-bit x86
builds are not currently supported (note 10/14: WIP, may work, just untested).
Under MSYS2/MinGW, the same Visual Studio CMake presets above are also supported. Under MSYS2/MinGW, we may also however build with GNU Clang or GCC.
- MSYS2
- An appropriate MSYS2 environment, such as CLANG64
- A suitable MinGW toolchain, for example mingw-w64-llvm
- Git (
pacman -S git
) - CMake 3.28 or higher (
pacman -S cmake
)
First, clone the ares repository:
git clone https://github.com/ares-emulator/ares
cd ares
Then, invoke CMake as normal with your chosen generator, e.g Ninja:
mkdir build && cd build
cmake .. -G "Ninja Multi-Config"
After configuration, build ares:
cmake --build . --config RelWithDebInfo
For further configuration options, see the [Build Options] page.