From aafd64137f24e96f0046a628d5e89874dde8eb86 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 18 Oct 2023 10:49:06 +0200 Subject: [PATCH] add boost --- CMakeLists.txt | 5 ++++- README.md | 3 ++- src/main.cpp | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c51c393..fbbe1b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/README.md b/README.md index 54cd750..e904ce5 100644 --- a/README.md +++ b/README.md @@ -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). + diff --git a/src/main.cpp b/src/main.cpp index 34bdcbe..9ef966a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,9 +1,12 @@ +#include #include #include #include #include +namespace po = boost::program_options; + void framebuffer_size_callback(GLFWwindow *window, int width, int height); void processInput(GLFWwindow *window);