diff --git a/README.md b/README.md index 4b90235..b9358b3 100644 --- a/README.md +++ b/README.md @@ -4,25 +4,46 @@ Basic rainbow triangle rendered with Vulkan. Created as a reference project while following the [official tutorial located here](https://docs.vulkan.org/tutorial/latest/00_Introduction.html) -## Compiling +## Building -Scripts for Linux are located in ./scripts/. +A windows and linux build_script binary compiled from [this](https://git.catgirls.fish/firewire/build-script) project has been included. +You can just run that from the root of the repo with `./scripts/build_script build` (or `.\scripts\build_script.exe build` for windows) to build all release types. -Make sure you have a CPP compiler, CMake, and ninja installed. +Most dependencies are included through the use of CPM, however you will need to install the VulkanSDK, which can be acquired from the [official site](https://vulkan.lunarg.com/sdk/home) -- `configure-{type].sh` - Creates and configures the associated build type in ./build/{type}. -- `build-{type}.sh` - Builds the associated build type in ./build/{type}. -- `build.sh` - Configures and builds all types in ./build/ -- `clean.sh` - Runs `ninja clean` on all build types +On linux systems you'll likely need dependencies for GLFW. +GLFW itself is included with this project, however its a lot simpler to just install glfw through your package manager and have it handle them. -If you are on linux and don't wish you build using the scripts you can go through -the following steps: +Ubuntu: `apt update && apt install libglfw3-dev` -1. `mkdir -p build; cd build`; -2. `cmake ../`; -3. `make -j 8` +Fedora: `dnf install glfw-devel` -Windows users, you're on your own. (sorry) +Arch: `pacman -S glfw` -## Running -Compiled exe is `triangle` on linux or `triangle.exe` on windows. +### Building manually + +#### Linux + +The normal cmake build process is all you need. + +1. Make the build directory `mkdir -p build` +2. Configure the project `cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release` +3. Build! `cmake --build build` + +#### Windows + +1. Git clone the repo +2. Run [cmake-gui](https://cmake.org/download/) +3. Select the location you cloned the repo into as the source directory +4. Create a new directory called 'build' in the source directory and select it + as the build directory +5. Configure and generate +6. Open the generated Visual studio project +7. Right click the project in the project explorer and select 'build' + +## A note for MacOS users + +I do not have a MacOS system to build or test on, so building is solely up to you. +All code has been kept as cross-platform as possible so it _should_ just work, +but if you run into any issues, feel free to submit a pull request with an updated +codebase or readme with compilation instructions.