add boost

This commit is contained in:
Christoph J. Scherr 2023-10-18 10:49:06 +02:00
parent ccf325d8fb
commit aafd64137f
3 changed files with 9 additions and 2 deletions

View File

@ -30,6 +30,9 @@ source_group("shaders" FILES ${PROJECT_SHADERS})
source_group("sources" FILES ${PROJECT_SOURCES})
source_group("vendors" FILES ${VENDORS_SOURCES})
find_package(Boost 1.56 REQUIRED COMPONENTS
program_options)
set(EXE_1_NAME loader)
file(
GLOB EXE_1_SOURCES
@ -40,7 +43,7 @@ set(CMAKE_BINARY_DIR "bin")
add_executable(${EXE_1_NAME} ${EXE_1_SOURCES} ${PROJECT_HEADERS}
${PROJECT_SHADERS} ${VENDORS_SOURCES})
target_link_libraries(${EXE_1_NAME} glfw ${GLAD_LIBRARIES})
target_link_libraries(${EXE_1_NAME} glfw ${GLAD_LIBRARIES} Boost::program_options)
target_include_directories(${EXE_1_NAME} PRIVATE include)
set_target_properties(${EXE_1_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${EXE_1_NAME})

View File

@ -9,7 +9,7 @@ For Fedora Systems, you can the dependencies like this:
```bash
sudo dnf install wayland-devel libxkbcommon-devel wayland-protocols-devel extra-cmake-modules \
libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel
libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel boost boost-doc boost-devel
```
Optional, but recommended Packages:
@ -22,3 +22,4 @@ sudo dnf install glfw-devel glfw glfw-doc glad
Your editor might need help to find the `include/` directory. If you are using
clangd, you can use the `.clangd` file in this repo. Just adjust the path to
what you need (it needs to be absolute).

View File

@ -1,9 +1,12 @@
#include <boost/program_options.hpp>
#include <glad/glad.c>
#include <GLFW/glfw3.h>
#include <iostream>
#include <unistd.h>
namespace po = boost::program_options;
void framebuffer_size_callback(GLFWwindow *window, int width, int height);
void processInput(GLFWwindow *window);