This guide will walk you through the setup process for the vender
OpenGL application using CMake and vcpkg for dependency management.
- CMake (version 3.15 or newer)
- A C++ compiler with C++20 support
- OpenGL drivers installed on your system
Start by cloning the main project repository to your local machine:
git clone https://github.com/silvanias/Vender.git
cd vender
Create a vcpkg
directory inside the project and set up vcpkg, a C++ library manager:
mkdir vcpkg
cd vcpkg
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh # On Windows use .\vcpkg\bootstrap-vcpkg.bat
Install the required libraries:
./vcpkg/vcpkg install glm
./vcpkg/vcpkg install glfw3
./vcpkg/vcpkg install glad
Again, on Windows, you would use .\vcpkg\vcpkg
instead of ./vcpkg/vcpkg
.
Clone the Dear ImGui library inside the lib
directory of your project:
mkdir lib
git clone https://github.com/ocornut/imgui.git lib/imgui
Create a build
directory and navigate into it:
mkdir build
cd build
Run CMake to generate the build files:
cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake
Within the build
directory, compile the application:
cmake --build .
After successfully building the application, execute it with the following command:
./vender
On Windows, you might need to navigate to the directory containing the generated executable and run vender.exe
.
If you encounter any issues during setup or compilation, ensure that:
- Your CMake and Git versions meet the minimum requirements.
- All the prerequisites are properly installed.
- The vcpkg toolchain file path in the CMake command is correct.
For additional help, refer to the documentation of the respective tools or libraries, or consider reaching out to their communities.