Skip to content
Snippets Groups Projects
Verified Commit aec9a05f authored by Tobias Frisch's avatar Tobias Frisch
Browse files

[#19] Added how to build details

parent 89d8cbd8
No related branches found
No related tags found
1 merge request!102Resolve "Weitere Informationen hinzufügen zu Readme.md"
Pipeline #27598 passed
...@@ -16,6 +16,11 @@ More information about Git LFS [here](https://git-lfs.github.com/). ...@@ -16,6 +16,11 @@ More information about Git LFS [here](https://git-lfs.github.com/).
Git submodules are used for libraries. Git submodules are used for libraries.
To download the submodules either clone using `git clone --recurse-submodules` or after `git clone` use `git submodule init` and `git submodule update`. To download the submodules either clone using `git clone --recurse-submodules` or after `git clone` use `git submodule init` and `git submodule update`.
Detailed build process:
- [How to build on Windows](doc/BUILD_WINDOWS.md)
- [How to build on macOS](doc/BUILD_MACOS.md)
- [How to build on Linux](doc/BUILD_LINUX.md)
### Dependencies (required): ### Dependencies (required):
Most dependencies will be used via submodules but for example Vulkan needs to be installed correctly depending on your platform. So please setup your environment properly. Most dependencies will be used via submodules but for example Vulkan needs to be installed correctly depending on your platform. So please setup your environment properly.
......
# How to build on Linux
## How to build with GCC on Archlinux by the way
1. Install required and useful tools to develop:
```
sudo pacman -S cmake gcc vulkan-icd-loader vulkan-headers vulkan-validation-layers vulkan-tools
```
2. Install the matching Vulkan drivers for your system:
```
# For discrete Nvidia GPUs:
sudo pacman -S nvidia
# For integrated or discrete Radeon GPUs:
sudo pacman -S vulkan-radeon
# For integrated or discrete Intel GPUs:
sudo pacman -S vulkan-intel
```
3. Clone the repository and run the following commands:
```
mkdir debug
cd debug
cmake -DCMAKE_C_COMPILER="/usr/bin/gcc" -DCMAKE_CXX_COMPILER="/usr/bin/g++" -DCMAKE_BUILD_TYPE=Debug ..
cmake --build .
```
## How to build with Clang on Archlinux by the way
1. Install required and useful tools to develop:
```
sudo pacman -S cmake clang vulkan-icd-loader vulkan-headers vulkan-validation-layers vulkan-tools
```
2. Install the matching Vulkan drivers for your system:
```
# For discrete Nvidia GPUs:
sudo pacman -S nvidia
# For integrated or discrete Radeon GPUs:
sudo pacman -S vulkan-radeon
# For integrated or discrete Intel GPUs:
sudo pacman -S vulkan-intel
```
3. Clone the repository and run the following commands:
```
mkdir debug
cd debug
cmake -DCMAKE_C_COMPILER="/usr/bin/clang" -DCMAKE_CXX_COMPILER="/usr/bin/clang++" -DCMAKE_BUILD_TYPE=Debug ..
cmake --build .
```
# How to build on macOS
## How to build with Clang on macOS
1. Install Homebrew
2. Install required tools to compile:
```
brew install cmake llvm libomp
```
3. Download and install latest [vulkansdk-macos-*.dmg](https://vulkan.lunarg.com/doc/sdk/1.2.189.0/mac/getting_started.html) to ~/VulkanSDK
4. Clone the repository and run the following commands:
```
mkdir debug
cd debug
export LDFLAGS="-L/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"
cmake -DCMAKE_C_COMPILER="/usr/local/opt/llvm/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/opt/llvm/bin/clang++" -DCMAKE_BUILD_TYPE=Debug ..
cmake --build .
```
\ No newline at end of file
# How to build on Windows
## How to build with MSVC on Windows
1. Something, something, open VisualStudio
2. Something, something, update VisualStudio
3. Install VulkanSDK and restart
4. Check for updates
5. Create a project solution and fix the mess
## How to build with GCC on Windows
1. Install MSYS2
2. Run "MSYS2 MSYS" from Start menu
3. Enter the following commands into MSYS2 console:
```
pacman -Syu
pacman -Su
pacman -S --needed base-devel mingw-w64-x86_64-toolchain
pacman -S cmake
```
4. Add to Path:
```
C:\msys64\usr\bin
C:\msys64\usr\local\bin
C:\msys64\mingw64\bin
C:\msys64\mingw32\bin
```
5. Clone the repository and run the following commands:
```
mkdir debug
cd debug
cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=C:\msys64\mingw64\bin\x86_64-w64-mingw32-gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\msys64\mingw64\bin\x86_64-w64-mingw32-g++.exe .. -G "Unix Makefiles"
cmake --build .
```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment