This repository has been archived on 2023-10-28. You can view files and clone it, but cannot push or open issues or pull requests.
frostbite/README.md

55 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

# Building
2020-02-06 13:23:46 +13:00
## Windows
### Visual Studio with vcpkg
Use `vcpkg` to install packages. See https://github.com/Microsoft/vcpkg
2020-02-06 13:23:46 +13:00
2020-02-07 05:26:36 +13:00
```
> git clone https://github.com/Microsoft/vcpkg.git
> cd vcpkg
PS> .\bootstrap-vcpkg.bat
Linux:~/$ ./bootstrap-vcpkg.sh
.\vcpkg integrate install
```
You will want to install the following packages as follows:
2020-02-06 13:23:46 +13:00
```
2020-02-07 05:26:36 +13:00
vcpkg install sdl2:x64-windows glm:x64-windows glew:x64-windows boost:x64-windows
2020-02-06 13:23:46 +13:00
```
Then you can open the directory in Visual Studio and it will be recognised as a CMake project.
Whether you use the open folder functionality or call `cmake` on the command line you will need to
set the toolchain file to the `vcpkg` one. This lives in the `vcpkg` directory under `scripts\buildsystems\vcpkg.cmake`
2020-02-06 13:23:46 +13:00
https://github.com/microsoft/vcpkg/blob/master/docs/examples/installing-and-using-packages.md#cmake-toolchain-file
Note that if you do `vcpkg integrate install` then you don't need to set the toolchain when using visual studio 2019
2020-02-06 13:23:46 +13:00
### Qt specifics
2021-03-16 11:11:52 +13:00
Installing Qt from the installer requires some mods to work. The path to Qt is hardcoded in the cmake file for the moment
and when running from Visual Studio Code you need something like the following in the launch config so that the
DLLs are found.
```
"env": {
"path": "C:\\Qt\\6.0.2\\msvc2019_64\\bin;%PATH%"
}
```
## Linux
### CMake
From the base directory:
```
mkdir build
cd build
cmake ..
make -j$(nproc)
```