From e5eb39295261cc11e53f31561ded94a6c1a115f5 Mon Sep 17 00:00:00 2001 From: Kade <26305836+Kade-github@users.noreply.github.com> Date: Sun, 14 Apr 2024 21:13:20 -0700 Subject: [PATCH] bunch of stuff --- .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++ .github/workflows/c-cpp.yml | 26 ------------------ src/CMakePresets.json | 12 +++++++++ src/Engine/Objects/2DCamera.cpp | 2 -- src/Game/Scenes/Gameplay.cpp | 1 - src/vcpkg.json | 7 +++++ 6 files changed, 66 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/c-cpp.yml create mode 100644 src/CMakePresets.json create mode 100644 src/vcpkg.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e1b020c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build +on: + push: +jobs: + build-project: + name: Linux Build + runs-on: ubuntu-latest + steps: + - name: Install PugiXML + run: sudo apt-get install libpugixml-dev + - name: Install GLFW + run: sudo apt-get install libglfw3-dev + - name: Install Assimp + run: sudo apt-get install libassimp-dev + - name: Checkout + uses: actions/checkout@v4.1.2 + - name: Configure and Build Project + uses: threeal/cmake-action@main + with: + c-compiler: clang + cxx-compiler: clang++ + source-dir: ./src + - name: Upload Build Artifacts + uses: actions/upload-artifact@v2 + with: + name: build + path: ./build + build-project-windows: + name: Windows Build + runs-on: windows-latest + steps: + - uses: lukka/get-cmake@latest + - name: Setup anew vcpkg + uses: lukka/run-vcpkg@v11 + - name: Checkout + uses: actions/checkout@v4.1.2 + - name: Run CMake consuming CMakePreset.json and run vcpkg to build packages + uses: lukka/run-cmake@v10 + with: + cmakeListsTxtPath: ./src/CMakeLists.txt + configurePreset: 'release' + buildPreset: 'release' + - name: Upload Build Artifacts + uses: actions/upload-artifact@v2 + with: + name: build + path: ./build \ No newline at end of file diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml deleted file mode 100644 index f5613f7..0000000 --- a/.github/workflows/c-cpp.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Build -on: - push: -jobs: - build-project: - name: Build Project - runs-on: ubuntu-latest - steps: - - name: Install PugiXML - run: sudo apt-get install libpugixml-dev - - name: Install GLFW - run: sudo apt-get install libglfw3-dev - - name: Install Assimp - run: sudo apt-get install libassimp-dev - - name: Checkout - uses: actions/checkout@v4.1.2 - - - name: Setup Ninja - uses: seanmiddleditch/gha-setup-ninja@v4 - - - name: Configure and Build Project - uses: threeal/cmake-action@main - with: - c-compiler: clang - cxx-compiler: clang++ - source-dir: ./src \ No newline at end of file diff --git a/src/CMakePresets.json b/src/CMakePresets.json new file mode 100644 index 0000000..10c66a2 --- /dev/null +++ b/src/CMakePresets.json @@ -0,0 +1,12 @@ +{ + "version": 2, + + "configurePresets": [ + { + "name": "release", + "cacheVariables": { + "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + } + } + ] +} \ No newline at end of file diff --git a/src/Engine/Objects/2DCamera.cpp b/src/Engine/Objects/2DCamera.cpp index 4c741d6..263c16a 100644 --- a/src/Engine/Objects/2DCamera.cpp +++ b/src/Engine/Objects/2DCamera.cpp @@ -1,6 +1,5 @@ #include "2DCamera.h" #include -#include #include Camera2D::Camera2D(glm::vec3 pos) : GameObject(pos) @@ -218,7 +217,6 @@ void Camera2D::UpdateFramebuffer() glDisable(GL_SCISSOR_TEST); glBindFramebuffer(GL_FRAMEBUFFER, 0); - } void Camera2D::MouseClick(int button, glm::vec2 pos) diff --git a/src/Game/Scenes/Gameplay.cpp b/src/Game/Scenes/Gameplay.cpp index 437bfca..da959f1 100644 --- a/src/Game/Scenes/Gameplay.cpp +++ b/src/Game/Scenes/Gameplay.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include #include "../LightingManager.h" #include "../MusicManager.h" diff --git a/src/vcpkg.json b/src/vcpkg.json new file mode 100644 index 0000000..2a26c42 --- /dev/null +++ b/src/vcpkg.json @@ -0,0 +1,7 @@ +{ + "dependencies": [ + "pugixml", + "glfw3", + "assimp" + ] +} \ No newline at end of file